Lines Matching refs:t
144 struct ip_tunnel *t; in ipgre_err() local
155 t = ip_tunnel_lookup(itn, skb->dev->ifindex, tpi->flags, in ipgre_err()
158 if (!t) in ipgre_err()
198 if (t->parms.iph.daddr == 0 || in ipgre_err()
199 ipv4_is_multicast(t->parms.iph.daddr)) in ipgre_err()
202 if (t->parms.iph.ttl == 0 && type == ICMP_TIME_EXCEEDED) in ipgre_err()
205 if (time_before(jiffies, t->err_time + IPTUNNEL_ERR_TIMEO)) in ipgre_err()
206 t->err_count++; in ipgre_err()
208 t->err_count = 1; in ipgre_err()
209 t->err_time = jiffies; in ipgre_err()
813 struct ip_tunnel *t = netdev_priv(dev); in ipgre_tunnel_ctl() local
815 t->parms.i_flags = p->i_flags; in ipgre_tunnel_ctl()
816 t->parms.o_flags = p->o_flags; in ipgre_tunnel_ctl()
858 struct ip_tunnel *t = netdev_priv(dev); in ipgre_header() local
862 iph = skb_push(skb, t->hlen + sizeof(*iph)); in ipgre_header()
864 greh->flags = gre_tnl_flags_to_gre_flags(t->parms.o_flags); in ipgre_header()
867 memcpy(iph, &t->parms.iph, sizeof(struct iphdr)); in ipgre_header()
875 return t->hlen + sizeof(*iph); in ipgre_header()
877 return -(t->hlen + sizeof(*iph)); in ipgre_header()
895 struct ip_tunnel *t = netdev_priv(dev); in ipgre_open() local
897 if (ipv4_is_multicast(t->parms.iph.daddr)) { in ipgre_open()
901 rt = ip_route_output_gre(t->net, &fl4, in ipgre_open()
902 t->parms.iph.daddr, in ipgre_open()
903 t->parms.iph.saddr, in ipgre_open()
904 t->parms.o_key, in ipgre_open()
905 RT_TOS(t->parms.iph.tos), in ipgre_open()
906 t->parms.link); in ipgre_open()
913 t->mlink = dev->ifindex; in ipgre_open()
914 ip_mc_inc_group(__in_dev_get_rtnl(dev), t->parms.iph.daddr); in ipgre_open()
921 struct ip_tunnel *t = netdev_priv(dev); in ipgre_close() local
923 if (ipv4_is_multicast(t->parms.iph.daddr) && t->mlink) { in ipgre_close()
925 in_dev = inetdev_by_index(t->net, t->mlink); in ipgre_close()
927 ip_mc_dec_group(in_dev, t->parms.iph.daddr); in ipgre_close()
1140 struct ip_tunnel *t = netdev_priv(dev); in ipgre_netlink_parms() local
1177 if (t->ignore_df) in ipgre_netlink_parms()
1183 t->collect_md = true; in ipgre_netlink_parms()
1192 t->ignore_df = !!nla_get_u8(data[IFLA_GRE_IGNORE_DF]); in ipgre_netlink_parms()
1207 struct ip_tunnel *t = netdev_priv(dev); in erspan_netlink_parms() local
1217 t->erspan_ver = nla_get_u8(data[IFLA_GRE_ERSPAN_VER]); in erspan_netlink_parms()
1219 if (t->erspan_ver > 2) in erspan_netlink_parms()
1223 if (t->erspan_ver == 1) { in erspan_netlink_parms()
1225 t->index = nla_get_u32(data[IFLA_GRE_ERSPAN_INDEX]); in erspan_netlink_parms()
1226 if (t->index & ~INDEX_MASK) in erspan_netlink_parms()
1229 } else if (t->erspan_ver == 2) { in erspan_netlink_parms()
1231 t->dir = nla_get_u8(data[IFLA_GRE_ERSPAN_DIR]); in erspan_netlink_parms()
1232 if (t->dir & ~(DIR_MASK >> DIR_OFFSET)) in erspan_netlink_parms()
1236 t->hwid = nla_get_u16(data[IFLA_GRE_ERSPAN_HWID]); in erspan_netlink_parms()
1237 if (t->hwid & ~(HWID_MASK >> HWID_OFFSET)) in erspan_netlink_parms()
1349 struct ip_tunnel *t = netdev_priv(dev); in ipgre_newlink_encap_setup() local
1350 int err = ip_tunnel_encap_setup(t, &ipencap); in ipgre_newlink_encap_setup()
1399 struct ip_tunnel *t = netdev_priv(dev); in ipgre_changelink() local
1400 __u32 fwmark = t->fwmark; in ipgre_changelink()
1416 t->parms.i_flags = p.i_flags; in ipgre_changelink()
1417 t->parms.o_flags = p.o_flags; in ipgre_changelink()
1428 struct ip_tunnel *t = netdev_priv(dev); in erspan_changelink() local
1429 __u32 fwmark = t->fwmark; in erspan_changelink()
1445 t->parms.i_flags = p.i_flags; in erspan_changelink()
1446 t->parms.o_flags = p.o_flags; in erspan_changelink()
1501 struct ip_tunnel *t = netdev_priv(dev); in ipgre_fill_info() local
1502 struct ip_tunnel_parm *p = &t->parms; in ipgre_fill_info()
1518 nla_put_u32(skb, IFLA_GRE_FWMARK, t->fwmark)) in ipgre_fill_info()
1522 t->encap.type) || in ipgre_fill_info()
1524 t->encap.sport) || in ipgre_fill_info()
1526 t->encap.dport) || in ipgre_fill_info()
1528 t->encap.flags)) in ipgre_fill_info()
1531 if (nla_put_u8(skb, IFLA_GRE_IGNORE_DF, t->ignore_df)) in ipgre_fill_info()
1534 if (t->collect_md) { in ipgre_fill_info()
1547 struct ip_tunnel *t = netdev_priv(dev); in erspan_fill_info() local
1549 if (t->erspan_ver <= 2) { in erspan_fill_info()
1550 if (t->erspan_ver != 0 && !t->collect_md) in erspan_fill_info()
1551 t->parms.o_flags |= TUNNEL_KEY; in erspan_fill_info()
1553 if (nla_put_u8(skb, IFLA_GRE_ERSPAN_VER, t->erspan_ver)) in erspan_fill_info()
1556 if (t->erspan_ver == 1) { in erspan_fill_info()
1557 if (nla_put_u32(skb, IFLA_GRE_ERSPAN_INDEX, t->index)) in erspan_fill_info()
1559 } else if (t->erspan_ver == 2) { in erspan_fill_info()
1560 if (nla_put_u8(skb, IFLA_GRE_ERSPAN_DIR, t->dir)) in erspan_fill_info()
1562 if (nla_put_u16(skb, IFLA_GRE_ERSPAN_HWID, t->hwid)) in erspan_fill_info()
1575 struct ip_tunnel *t = netdev_priv(dev); in erspan_setup() local
1583 t->erspan_ver = 1; in erspan_setup()
1661 struct ip_tunnel *t; in gretap_fb_dev_create() local
1672 t = netdev_priv(dev); in gretap_fb_dev_create()
1673 t->collect_md = true; in gretap_fb_dev_create()