net: Fix up inet_addr_type checks
Currently inet_addr_type and inet_dev_addr_type expect local addresses to be in the local table. With the VRF device local routes for devices associated with a VRF will be in the table associated with the VRF. Provide an alternate inet_addr lookup to use a specific table rather than defaulting to the local table. inet_addr_type_dev_table keeps the same semantics as inet_addr_type but if the passed in device is enslaved to a VRF then the table for that VRF is used for the lookup. Signed-off-by:David Ahern <dsa@cumulusnetworks.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
Showing
- include/net/route.h 3 additions, 0 deletionsinclude/net/route.h
- net/ipv4/af_inet.c 12 additions, 1 deletionnet/ipv4/af_inet.c
- net/ipv4/arp.c 9 additions, 6 deletionsnet/ipv4/arp.c
- net/ipv4/fib_frontend.c 22 additions, 3 deletionsnet/ipv4/fib_frontend.c
- net/ipv4/fib_semantics.c 4 additions, 2 deletionsnet/ipv4/fib_semantics.c
- net/ipv4/icmp.c 3 additions, 2 deletionsnet/ipv4/icmp.c
Loading
Please register or sign in to comment