diff options
author | Nicolas Dichtel <[email protected]> | 2019-07-15 12:00:20 +0200 |
---|---|---|
committer | Steffen Klassert <[email protected]> | 2019-07-17 10:03:54 +0200 |
commit | e9e7e85d75f3731079ffd77c1a66f037aef04fe7 (patch) | |
tree | 65f27b789ff1758a4eea9a5942c283cad8bf97f0 /scripts/gcc-plugins/gcc-generate-simple_ipa-pass.h | |
parent | 114a5c3240155fdb01bf821c9d326d7bb05bd464 (diff) |
xfrm interface: avoid corruption on changelink
The new parameters must not be stored in the netdev_priv() before
validation, it may corrupt the interface. Note also that if data is NULL,
only a memset() is done.
$ ip link add xfrm1 type xfrm dev lo if_id 1
$ ip link add xfrm2 type xfrm dev lo if_id 2
$ ip link set xfrm1 type xfrm dev lo if_id 2
RTNETLINK answers: File exists
$ ip -d link list dev xfrm1
5: xfrm1@lo: <NOARP> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
link/none 00:00:00:00:00:00 brd 00:00:00:00:00:00 promiscuity 0 minmtu 68 maxmtu 1500
xfrm if_id 0x2 addrgenmode eui64 numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535
=> "if_id 0x2"
Fixes: f203b76d7809 ("xfrm: Add virtual xfrm interfaces")
Signed-off-by: Nicolas Dichtel <[email protected]>
Tested-by: Julien Floret <[email protected]>
Signed-off-by: Steffen Klassert <[email protected]>
Diffstat (limited to 'scripts/gcc-plugins/gcc-generate-simple_ipa-pass.h')
0 files changed, 0 insertions, 0 deletions