- 论坛徽章:
- 0
|
回复 8# hamiltonlin
看完就懂了.- static unsigned int br_nf_pre_routing(unsigned int hook, struct sk_buff *skb,
- 553 const struct net_device *in,
- 554 const struct net_device *out,
- 555 int (*okfn)(struct sk_buff *))
- 556{
- 557 struct iphdr *iph;
- 558 __u32 len = nf_bridge_encap_header_len(skb);
- 559
- 560 if (unlikely(!pskb_may_pull(skb, len)))
- 561 goto out;
- 562
- 563 if (skb->protocol == htons(ETH_P_IPV6) || IS_VLAN_IPV6(skb) ||
- 564 IS_PPPOE_IPV6(skb)) {
- 565#ifdef CONFIG_SYSCTL
- 566 if (!brnf_call_ip6tables)
- 567 return NF_ACCEPT;
- 568#endif
- 569 nf_bridge_pull_encap_header_rcsum(skb);
- 570 return br_nf_pre_routing_ipv6(hook, skb, in, out, okfn);
- 571 }
- 572#ifdef CONFIG_SYSCTL
- 573 if (!brnf_call_iptables)
- 574 return NF_ACCEPT;
- 575#endif
- 576
- 577 if (skb->protocol != htons(ETH_P_IP) && !IS_VLAN_IP(skb) &&
- 578 !IS_PPPOE_IP(skb))
- 579 return NF_ACCEPT;
复制代码 |
|