Lines Matching refs:iph

108 		if (local == t->parms.iph.saddr &&  in ipip6_tunnel_lookup()
109 remote == t->parms.iph.daddr && in ipip6_tunnel_lookup()
116 if (remote == t->parms.iph.daddr && in ipip6_tunnel_lookup()
123 if (local == t->parms.iph.saddr && in ipip6_tunnel_lookup()
138 __be32 remote = parms->iph.daddr; in __ipip6_bucket()
139 __be32 local = parms->iph.saddr; in __ipip6_bucket()
207 __dev_addr_set(dev, &t->parms.iph.saddr, 4); in ipip6_tunnel_create()
208 memcpy(dev->broadcast, &t->parms.iph.daddr, 4); in ipip6_tunnel_create()
231 __be32 remote = parms->iph.daddr; in ipip6_tunnel_locate()
232 __be32 local = parms->iph.saddr; in ipip6_tunnel_locate()
242 if (local == t->parms.iph.saddr && in ipip6_tunnel_locate()
243 remote == t->parms.iph.daddr && in ipip6_tunnel_locate()
486 isatap_chksrc(struct sk_buff *skb, const struct iphdr *iph, struct ip_tunnel *t) in isatap_chksrc() argument
492 p = __ipip6_tunnel_locate_prl(t, iph->saddr); in isatap_chksrc()
502 (addr6->s6_addr32[3] == iph->saddr) && in isatap_chksrc()
529 const struct iphdr *iph = (const struct iphdr *)skb->data; in ipip6_err() local
568 iph->daddr, iph->saddr, sifindex); in ipip6_err()
574 t->parms.link, iph->protocol); in ipip6_err()
580 iph->protocol); in ipip6_err()
587 !ip6_err_gen_icmpv6_unreach(skb, iph->ihl * 4, type, data_len)) in ipip6_err()
590 if (t->parms.iph.daddr == 0) in ipip6_err()
593 if (t->parms.iph.ttl == 0 && type == ICMP_TIME_EXCEEDED) in ipip6_err()
642 const struct iphdr *iph, in packet_is_spoofed() argument
648 if (!isatap_chksrc(skb, iph, tunnel)) in packet_is_spoofed()
659 if (unlikely(is_spoofed_6rd(tunnel, iph->saddr, &ipv6h->saddr))) { in packet_is_spoofed()
661 &iph->saddr, &ipv6h->saddr, in packet_is_spoofed()
662 &iph->daddr, &ipv6h->daddr); in packet_is_spoofed()
666 if (likely(!is_spoofed_6rd(tunnel, iph->daddr, &ipv6h->daddr))) in packet_is_spoofed()
673 &iph->saddr, &ipv6h->saddr, in packet_is_spoofed()
674 &iph->daddr, &ipv6h->daddr); in packet_is_spoofed()
680 const struct iphdr *iph = ip_hdr(skb); in ipip6_rcv() local
687 iph->saddr, iph->daddr, sifindex); in ipip6_rcv()
691 if (tunnel->parms.iph.protocol != IPPROTO_IPV6 && in ipip6_rcv()
692 tunnel->parms.iph.protocol != 0) in ipip6_rcv()
700 if (packet_is_spoofed(skb, iph, tunnel)) { in ipip6_rcv()
712 iph = (const struct iphdr *)skb_mac_header(skb); in ipip6_rcv()
715 err = IP_ECN_decapsulate(iph, skb); in ipip6_rcv()
719 &iph->saddr, iph->tos); in ipip6_rcv()
759 const struct iphdr *iph; in sit_tunnel_rcv() local
765 iph = ip_hdr(skb); in sit_tunnel_rcv()
767 iph->saddr, iph->daddr, sifindex); in sit_tunnel_rcv()
771 if (tunnel->parms.iph.protocol != ipproto && in sit_tunnel_rcv()
772 tunnel->parms.iph.protocol != 0) in sit_tunnel_rcv()
865 const struct iphdr *tiph = &tunnel->parms.iph; in ipip6_tunnel_xmit()
867 u8 tos = tunnel->parms.iph.tos; in ipip6_tunnel_xmit()
991 if (tunnel->parms.iph.daddr) in ipip6_tunnel_xmit()
1058 const struct iphdr *tiph = &tunnel->parms.iph; in sit_tunnel_xmit__()
1108 const struct iphdr *iph; in ipip6_tunnel_bind_dev() local
1112 iph = &tunnel->parms.iph; in ipip6_tunnel_bind_dev()
1114 if (iph->daddr) { in ipip6_tunnel_bind_dev()
1117 iph->daddr, iph->saddr, in ipip6_tunnel_bind_dev()
1120 RT_TOS(iph->tos), in ipip6_tunnel_bind_dev()
1150 t->parms.iph.saddr = p->iph.saddr; in ipip6_tunnel_update()
1151 t->parms.iph.daddr = p->iph.daddr; in ipip6_tunnel_update()
1152 __dev_addr_set(t->dev, &p->iph.saddr, 4); in ipip6_tunnel_update()
1153 memcpy(t->dev->broadcast, &p->iph.daddr, 4); in ipip6_tunnel_update()
1155 t->parms.iph.ttl = p->iph.ttl; in ipip6_tunnel_update()
1156 t->parms.iph.tos = p->iph.tos; in ipip6_tunnel_update()
1157 t->parms.iph.frag_off = p->iph.frag_off; in ipip6_tunnel_update()
1263 if (!ipip6_valid_ip_proto(p->iph.protocol)) in __ipip6_tunnel_ioctl_validate()
1265 if (p->iph.version != 4 || in __ipip6_tunnel_ioctl_validate()
1266 p->iph.ihl != 5 || (p->iph.frag_off & htons(~IP_DF))) in __ipip6_tunnel_ioctl_validate()
1269 if (p->iph.ttl) in __ipip6_tunnel_ioctl_validate()
1270 p->iph.frag_off |= htons(IP_DF); in __ipip6_tunnel_ioctl_validate()
1322 if (((dev->flags & IFF_POINTOPOINT) && !p->iph.daddr) || in ipip6_tunnel_change()
1323 (!(dev->flags & IFF_POINTOPOINT) && p->iph.daddr)) in ipip6_tunnel_change()
1473 struct iphdr *iph = &tunnel->parms.iph; in ipip6_fb_tunnel_init() local
1477 iph->version = 4; in ipip6_fb_tunnel_init()
1478 iph->protocol = IPPROTO_IPV6; in ipip6_fb_tunnel_init()
1479 iph->ihl = 5; in ipip6_fb_tunnel_init()
1480 iph->ttl = 64; in ipip6_fb_tunnel_init()
1506 parms->iph.version = 4; in ipip6_netlink_parms()
1507 parms->iph.protocol = IPPROTO_IPV6; in ipip6_netlink_parms()
1508 parms->iph.ihl = 5; in ipip6_netlink_parms()
1509 parms->iph.ttl = 64; in ipip6_netlink_parms()
1518 parms->iph.saddr = nla_get_be32(data[IFLA_IPTUN_LOCAL]); in ipip6_netlink_parms()
1521 parms->iph.daddr = nla_get_be32(data[IFLA_IPTUN_REMOTE]); in ipip6_netlink_parms()
1524 parms->iph.ttl = nla_get_u8(data[IFLA_IPTUN_TTL]); in ipip6_netlink_parms()
1525 if (parms->iph.ttl) in ipip6_netlink_parms()
1526 parms->iph.frag_off = htons(IP_DF); in ipip6_netlink_parms()
1530 parms->iph.tos = nla_get_u8(data[IFLA_IPTUN_TOS]); in ipip6_netlink_parms()
1533 parms->iph.frag_off = htons(IP_DF); in ipip6_netlink_parms()
1539 parms->iph.protocol = nla_get_u8(data[IFLA_IPTUN_PROTO]); in ipip6_netlink_parms()
1690 if (((dev->flags & IFF_POINTOPOINT) && !p.iph.daddr) || in ipip6_changelink()
1691 (!(dev->flags & IFF_POINTOPOINT) && p.iph.daddr)) in ipip6_changelink()
1760 nla_put_in_addr(skb, IFLA_IPTUN_LOCAL, parm->iph.saddr) || in ipip6_fill_info()
1761 nla_put_in_addr(skb, IFLA_IPTUN_REMOTE, parm->iph.daddr) || in ipip6_fill_info()
1762 nla_put_u8(skb, IFLA_IPTUN_TTL, parm->iph.ttl) || in ipip6_fill_info()
1763 nla_put_u8(skb, IFLA_IPTUN_TOS, parm->iph.tos) || in ipip6_fill_info()
1765 !!(parm->iph.frag_off & htons(IP_DF))) || in ipip6_fill_info()
1766 nla_put_u8(skb, IFLA_IPTUN_PROTO, parm->iph.protocol) || in ipip6_fill_info()