ipv6: protect protocols not handling ipv4 from v4 connection/bind attempts
Some ipv6 protocols cannot handle ipv4 addresses, so we must not allow connecting and binding to them. sendmsg logic does already check msg->name for this but must trust already connected sockets which could be set up for connection to ipv4 address family. Per-socket flag ipv6only is of no use here, as it is under users control by setsockopt. Signed-off-by:Hannes Frederic Sowa <hannes@stressinduktion.org> Signed-off-by:
David S. Miller <davem@davemloft.net>
Showing
- include/net/ipv6.h 2 additions, 0 deletionsinclude/net/ipv6.h
- net/ipv4/ping.c 3 additions, 0 deletionsnet/ipv4/ping.c
- net/ipv6/datagram.c 10 additions, 0 deletionsnet/ipv6/datagram.c
- net/ipv6/ping.c 1 addition, 1 deletionnet/ipv6/ping.c
- net/ipv6/raw.c 5 additions, 1 deletionnet/ipv6/raw.c
- net/l2tp/l2tp_ip6.c 3 additions, 0 deletionsnet/l2tp/l2tp_ip6.c
Loading
Please register or sign in to comment