mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-26 08:31:13 +00:00
[NETFILTER]: Introduce NF_INET_ hook values
The IPv4 and IPv6 hook values are identical, yet some code tries to figure out the "correct" value by looking at the address family. Introduce NF_INET_* values for both IPv4 and IPv6. The old values are kept in a #ifndef __KERNEL__ section for userspace compatibility. Signed-off-by: Patrick McHardy <kaber@trash.net> Acked-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
1bf06cd2e3
commit
6e23ae2a48
69 changed files with 321 additions and 302 deletions
|
@ -533,7 +533,8 @@ static void __ndisc_send(struct net_device *dev,
|
|||
idev = in6_dev_get(dst->dev);
|
||||
IP6_INC_STATS(idev, IPSTATS_MIB_OUTREQUESTS);
|
||||
|
||||
err = NF_HOOK(PF_INET6, NF_IP6_LOCAL_OUT, skb, NULL, dst->dev, dst_output);
|
||||
err = NF_HOOK(PF_INET6, NF_INET_LOCAL_OUT, skb, NULL, dst->dev,
|
||||
dst_output);
|
||||
if (!err) {
|
||||
ICMP6MSGOUT_INC_STATS(idev, type);
|
||||
ICMP6_INC_STATS(idev, ICMP6_MIB_OUTMSGS);
|
||||
|
@ -1538,7 +1539,8 @@ void ndisc_send_redirect(struct sk_buff *skb, struct neighbour *neigh,
|
|||
buff->dst = dst;
|
||||
idev = in6_dev_get(dst->dev);
|
||||
IP6_INC_STATS(idev, IPSTATS_MIB_OUTREQUESTS);
|
||||
err = NF_HOOK(PF_INET6, NF_IP6_LOCAL_OUT, buff, NULL, dst->dev, dst_output);
|
||||
err = NF_HOOK(PF_INET6, NF_INET_LOCAL_OUT, buff, NULL, dst->dev,
|
||||
dst_output);
|
||||
if (!err) {
|
||||
ICMP6MSGOUT_INC_STATS(idev, NDISC_REDIRECT);
|
||||
ICMP6_INC_STATS(idev, ICMP6_MIB_OUTMSGS);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue