David Ahern
7bb387c5ab
net: Allow IP_MULTICAST_IF to set index to L3 slave
...
IP_MULTICAST_IF fails if sk_bound_dev_if is already set and the new index
does not match it. e.g.,
ntpd[15381]: setsockopt IP_MULTICAST_IF 192.168.1.23 fails: Invalid argument
Relax the check in setsockopt to allow setting mc_index to an L3 slave if
sk_bound_dev_if points to an L3 master.
Make a similar change for IPv6. In this case change the device lookup to
take the rcu_read_lock avoiding a refcnt. The rcu lock is also needed for
the lookup of a potential L3 master device.
This really only silences a setsockopt failure since uses of mc_index are
secondary to sk_bound_dev_if if it is set. In both cases, if either index
is an L3 slave or master, lookups are directed to the same FIB table so
relaxing the check at setsockopt time causes no harm.
Patch is based on a suggested change by Darwin for a problem noted in
their code base.
Suggested-by: Darwin Dingel <[email protected] >
Signed-off-by: David Ahern <[email protected] >
Signed-off-by: David S. Miller <[email protected] >
2016-12-30 15:24:47 -05:00
..
6lowpan
6lowpan: ndisc: no overreact if no short address is available
2016-09-19 20:19:34 +02:00
9p
IB/core: add support to create a unsafe global rkey to ib_create_pd
2016-09-23 13:47:44 -04:00
802
Replace <asm/uaccess.h> with <linux/uaccess.h> globally
2016-12-24 11:46:01 -08:00
8021q
Replace <asm/uaccess.h> with <linux/uaccess.h> globally
2016-12-24 11:46:01 -08:00
appletalk
appletalk: use IS_ENABLED() instead of checking for built-in or module
2016-09-10 21:19:10 -07:00
atm
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
2016-12-17 20:17:04 -08:00
ax25
Replace <asm/uaccess.h> with <linux/uaccess.h> globally
2016-12-24 11:46:01 -08:00
batman-adv
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
2016-12-06 21:33:19 -05:00
bluetooth
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
2016-12-16 10:24:44 -08:00
bridge
Replace <asm/uaccess.h> with <linux/uaccess.h> globally
2016-12-24 11:46:01 -08:00
caif
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
2016-12-06 21:33:19 -05:00
can
ktime: Cleanup ktime_set() usage
2016-12-25 17:21:22 +01:00
ceph
libceph: remove now unused finish_request() wrapper
2016-12-14 22:39:08 +01:00
core
net: dev_weight: TX/RX orthogonality
2016-12-29 15:38:35 -05:00
dcb
net: dcb: set error code on failures
2016-12-03 23:54:25 -05:00
dccp
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
2016-12-03 12:29:53 -05:00
decnet
Replace <asm/uaccess.h> with <linux/uaccess.h> globally
2016-12-24 11:46:01 -08:00
dns_resolver
dsa
net: dsa: Implement ndo_get_phys_port_id
2016-12-29 22:16:53 -05:00
ethernet
net: make default TX queue length a defined constant
2016-11-07 20:15:55 -05:00
hsr
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
2016-10-30 12:42:58 -04:00
ieee802154
Makefile: drop -D__CHECK_ENDIAN__ from cflags
2016-12-16 00:13:43 +02:00
ipv4
net: Allow IP_MULTICAST_IF to set index to L3 slave
2016-12-30 15:24:47 -05:00
ipv6
net: Allow IP_MULTICAST_IF to set index to L3 slave
2016-12-30 15:24:47 -05:00
ipx
ktime: Get rid of the union
2016-12-25 17:21:22 +01:00
irda
Replace <asm/uaccess.h> with <linux/uaccess.h> globally
2016-12-24 11:46:01 -08:00
iucv
Merge branch 'smp-hotplug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
2016-12-12 19:25:04 -08:00
kcm
Merge branch 'work.splice_read' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
2016-10-07 15:36:58 -07:00
key
netns: make struct pernet_operations::id unsigned int
2016-11-18 10:59:15 -05:00
l2tp
net: l2tp: ppp: change PPPOL2TP_MSG_* => L2TP_MSG_*
2016-12-10 23:29:11 -05:00
l3mdev
net: ipv6: Remove l3mdev_get_saddr6
2016-09-10 23:12:53 -07:00
lapb
Replace <asm/uaccess.h> with <linux/uaccess.h> globally
2016-12-24 11:46:01 -08:00
llc
net: fix sleeping for sk_wait_event()
2016-11-14 13:17:21 -05:00
mac80211
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
2016-12-17 20:17:04 -08:00
mac802154
ktime: Cleanup ktime_set() usage
2016-12-25 17:21:22 +01:00
mpls
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
2016-12-06 21:33:19 -05:00
ncsi
net/ncsi: Improve HNCDSC AEN handler
2016-10-20 11:23:08 -04:00
netfilter
ktime: Get rid of the union
2016-12-25 17:21:22 +01:00
netlabel
genetlink: mark families as __ro_after_init
2016-10-27 16:16:09 -04:00
netlink
Replace <asm/uaccess.h> with <linux/uaccess.h> globally
2016-12-24 11:46:01 -08:00
netrom
nfc
genetlink: mark families as __ro_after_init
2016-10-27 16:16:09 -04:00
openvswitch
openvswitch: upcall: Fix vlan handling.
2016-12-27 12:28:07 -05:00
packet
Replace <asm/uaccess.h> with <linux/uaccess.h> globally
2016-12-24 11:46:01 -08:00
phonet
netns: make struct pernet_operations::id unsigned int
2016-11-18 10:59:15 -05:00
qrtr
rds
RDS: use rb_entry()
2016-12-20 14:22:49 -05:00
rfkill
rose
Replace <asm/uaccess.h> with <linux/uaccess.h> globally
2016-12-24 11:46:01 -08:00
rxrpc
rxrpc: abstract away knowledge of IDR internals
2016-12-14 16:04:10 -08:00
sched
net: dev_weight: TX/RX orthogonality
2016-12-29 15:38:35 -05:00
sctp
sctp: refactor sctp_datamsg_from_user
2016-12-29 14:44:03 -05:00
strparser
strparser: Propagate correct error code in strp_recv()
2016-10-12 01:51:49 -04:00
sunrpc
ktime: Get rid of the union
2016-12-25 17:21:22 +01:00
switchdev
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
2016-10-30 12:42:58 -04:00
tipc
tipc: don't send FIN message from connectionless socket
2016-12-23 17:53:47 -05:00
unix
Replace <asm/uaccess.h> with <linux/uaccess.h> globally
2016-12-24 11:46:01 -08:00
vmw_vsock
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
2016-12-17 20:17:04 -08:00
wimax
genetlink: mark families as __ro_after_init
2016-10-27 16:16:09 -04:00
wireless
Makefile: drop -D__CHECK_ENDIAN__ from cflags
2016-12-16 00:13:43 +02:00
x25
Replace <asm/uaccess.h> with <linux/uaccess.h> globally
2016-12-24 11:46:01 -08:00
xfrm
ktime: Cleanup ktime_set() usage
2016-12-25 17:21:22 +01:00
compat.c
Replace <asm/uaccess.h> with <linux/uaccess.h> globally
2016-12-24 11:46:01 -08:00
Kconfig
bpf: BPF for lightweight tunnel infrastructure
2016-12-02 10:51:49 -05:00
Makefile
socket.c
ktime: Get rid of the union
2016-12-25 17:21:22 +01:00
sysctl_net.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace
2016-10-06 09:52:23 -07:00