--- zzzz-none-000/linux-2.6.28.10/net/ipv4/ip_input.c 2009-05-02 18:54:43.000000000 +0000 +++ fusiv-7390-686/linux-2.6.28.10/net/ipv4/ip_input.c 2012-02-14 14:37:49.000000000 +0000 @@ -332,7 +332,7 @@ * how the packet travels inside Linux networking. */ if (skb->dst == NULL) { - int err = ip_route_input(skb, iph->daddr, iph->saddr, iph->tos, + int err = ip_route_input(skb, RD16(iph->daddr), RD16(iph->saddr), iph->tos, skb->dev); if (unlikely(err)) { if (err == -EHOSTUNREACH) @@ -409,22 +409,22 @@ * 4. Doesn't have a bogus length */ - if (iph->ihl < 5 || iph->version != 4) + if (IP_IHL(iph) < 5 || iph->version != 4) goto inhdr_error; - if (!pskb_may_pull(skb, iph->ihl*4)) + if (!pskb_may_pull(skb, IP_IHL(iph)*4)) goto inhdr_error; iph = ip_hdr(skb); - if (unlikely(ip_fast_csum((u8 *)iph, iph->ihl))) + if (unlikely(ip_fast_csum((u8 *)iph, IP_IHL(iph)))) goto inhdr_error; len = ntohs(iph->tot_len); if (skb->len < len) { IP_INC_STATS_BH(dev_net(dev), IPSTATS_MIB_INTRUNCATEDPKTS); goto drop; - } else if (len < (iph->ihl*4)) + } else if (len < (IP_IHL(iph)*4)) goto inhdr_error; /* Our transport medium may have padded the buffer out. Now we know it @@ -439,6 +439,10 @@ /* Remove any debris in the socket control block */ memset(IPCB(skb), 0, sizeof(struct inet_skb_parm)); +#ifdef CONFIG_AVM_PA + AVM_PKT_INFO(skb)->ptype_pid_handle = AVM_PA_PTYPE_DEVINFO(pt)->pid_handle; +#endif + return NF_HOOK(PF_INET, NF_INET_PRE_ROUTING, skb, dev, NULL, ip_rcv_finish);