Lines Matching refs:iph
106 struct iphdr *iph; in tcf_nat_act() local
133 if (!pskb_may_pull(skb, sizeof(*iph) + noff)) in tcf_nat_act()
136 iph = ip_hdr(skb); in tcf_nat_act()
139 addr = iph->saddr; in tcf_nat_act()
141 addr = iph->daddr; in tcf_nat_act()
144 if (skb_try_make_writable(skb, sizeof(*iph) + noff)) in tcf_nat_act()
151 iph = ip_hdr(skb); in tcf_nat_act()
153 iph->saddr = new_addr; in tcf_nat_act()
155 iph->daddr = new_addr; in tcf_nat_act()
157 csum_replace4(&iph->check, addr, new_addr); in tcf_nat_act()
158 } else if ((iph->frag_off & htons(IP_OFFSET)) || in tcf_nat_act()
159 iph->protocol != IPPROTO_ICMP) { in tcf_nat_act()
163 ihl = iph->ihl * 4; in tcf_nat_act()
166 switch (iph->frag_off & htons(IP_OFFSET) ? 0 : iph->protocol) { in tcf_nat_act()
209 if (!pskb_may_pull(skb, ihl + sizeof(*icmph) + sizeof(*iph) + in tcf_nat_act()
214 iph = (void *)(icmph + 1); in tcf_nat_act()
216 addr = iph->daddr; in tcf_nat_act()
218 addr = iph->saddr; in tcf_nat_act()
224 sizeof(*iph) + noff)) in tcf_nat_act()
228 iph = (void *)(icmph + 1); in tcf_nat_act()
235 iph->daddr = new_addr; in tcf_nat_act()
237 iph->saddr = new_addr; in tcf_nat_act()