]> git.baikalelectronics.ru Git - kernel.git/commit
neighbor: Add skip_cache argument to neigh_output
authorDavid Ahern <dsahern@gmail.com>
Fri, 5 Apr 2019 23:30:33 +0000 (16:30 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 8 Apr 2019 22:22:41 +0000 (15:22 -0700)
commitbf018edf1c248ee6e84bfcca96abe185d4eaca02
tree5a815e6a8e58d9b4be5d72259bf5f53078ad43d6
parenta275a77839efbe6f968ac9ecb3a047fa3ee93878
neighbor: Add skip_cache argument to neigh_output

A later patch allows an IPv6 gateway with an IPv4 route. The neighbor
entry will exist in the v6 ndisc table and the cached header will contain
the ipv6 protocol which is wrong for an IPv4 packet. For an IPv4 packet to
use the v6 neighbor entry, neigh_output needs to skip the cached header
and just use the output callback for the neigh entry.

A future patchset can look at expanding the hh_cache to handle 2
protocols. For now, IPv6 gateways with an IPv4 route will take the
extra overhead of generating the header.

Signed-off-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/vrf.c
include/net/neighbour.h
net/ipv4/ip_output.c
net/ipv6/ip6_output.c