diff options
| author | 2016-07-20 22:07:24 -0700 | |
|---|---|---|
| committer | 2016-07-20 22:07:24 -0700 | |
| commit | 1c137ef48662904ba83812de94dce01f99b24f0c (patch) | |
| tree | 200e2c322ef0863e1940ee08af5ae1d38947877e /net/core | |
| parent | Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue (diff) | |
| parent | bpf: make xdp sample variable names more meaningful (diff) | |
| download | wireguard-linux-1c137ef48662904ba83812de94dce01f99b24f0c.tar.xz wireguard-linux-1c137ef48662904ba83812de94dce01f99b24f0c.zip | |
Merge branch 'xdp-cleanups'
Brenden Blanco says:
====================
misc cleanups for xdp
This addresses several of the non-blocking comments left over from the
xdp patch set. See individual patches for details.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
| -rw-r--r-- | net/core/rtnetlink.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index eba2b8260dbd..189cc78c77eb 100644 --- a/net/core/rtnetlink.c +++ b/net/core/rtnetlink.c @@ -2109,6 +2109,10 @@ static int do_setlink(const struct sk_buff *skb, if (err < 0) goto errout; + if (xdp[IFLA_XDP_ATTACHED]) { + err = -EINVAL; + goto errout; + } if (xdp[IFLA_XDP_FD]) { err = dev_change_xdp_fd(dev, nla_get_s32(xdp[IFLA_XDP_FD])); |
