Lines Matching defs:parms
95 if (local != t->parms.iph.saddr ||
96 remote != t->parms.iph.daddr ||
100 if (!ip_tunnel_key_match(&t->parms, flags, key))
103 if (READ_ONCE(t->parms.link) == link)
109 if (remote != t->parms.iph.daddr ||
110 t->parms.iph.saddr != 0 ||
114 if (!ip_tunnel_key_match(&t->parms, flags, key))
117 if (READ_ONCE(t->parms.link) == link)
127 if ((local != t->parms.iph.saddr || t->parms.iph.daddr != 0) &&
128 (local != t->parms.iph.daddr || !ipv4_is_multicast(local)))
134 if (!ip_tunnel_key_match(&t->parms, flags, key))
137 if (READ_ONCE(t->parms.link) == link)
145 t->parms.i_key != key) ||
146 t->parms.iph.saddr != 0 ||
147 t->parms.iph.daddr != 0 ||
151 if (READ_ONCE(t->parms.link) == link)
173 struct ip_tunnel_parm_kern *parms)
177 __be32 i_key = parms->i_key;
179 if (parms->iph.daddr && !ipv4_is_multicast(parms->iph.daddr))
180 remote = parms->iph.daddr;
184 if (!test_bit(IP_TUNNEL_KEY_BIT, parms->i_flags) &&
185 test_bit(IP_TUNNEL_VTI_BIT, parms->i_flags))
194 struct hlist_head *head = ip_bucket(itn, &t->parms);
209 struct ip_tunnel_parm_kern *parms,
212 __be32 remote = parms->iph.daddr;
213 __be32 local = parms->iph.saddr;
215 __be32 key = parms->i_key;
216 int link = parms->link;
218 struct hlist_head *head = ip_bucket(itn, parms);
220 ip_tunnel_flags_copy(flags, parms->i_flags);
223 if (local == t->parms.iph.saddr &&
224 remote == t->parms.iph.daddr &&
225 link == READ_ONCE(t->parms.link) &&
227 ip_tunnel_key_match(&t->parms, flags, key))
235 struct ip_tunnel_parm_kern *parms)
243 if (parms->name[0]) {
244 if (!dev_valid_name(parms->name))
246 strscpy(name, parms->name);
265 tunnel->parms = *parms;
289 iph = &tunnel->parms.iph;
297 iph->saddr, tunnel->parms.o_key,
299 tunnel->parms.link, tunnel->fwmark, 0, 0);
312 if (!tdev && tunnel->parms.link)
313 tdev = __dev_get_by_index(tunnel->net, tunnel->parms.link);
331 struct ip_tunnel_parm_kern *parms)
339 dev = __ip_tunnel_create(net, itn->rtnl_link_ops, parms);
391 if (test_bit(IP_TUNNEL_CSUM_BIT, tunnel->parms.i_flags) !=
398 if (test_bit(IP_TUNNEL_SEQ_BIT, tunnel->parms.i_flags)) {
550 daddr = md ? dst : tunnel->parms.iph.daddr;
701 connected = (tunnel->parms.iph.daddr != 0);
777 tunnel->parms.o_key, tos & INET_DSCP_MASK,
778 tunnel->net, READ_ONCE(tunnel->parms.link),
881 t->parms.iph.saddr = p->iph.saddr;
882 t->parms.iph.daddr = p->iph.daddr;
883 t->parms.i_key = p->i_key;
884 t->parms.o_key = p->o_key;
891 t->parms.iph.ttl = p->iph.ttl;
892 t->parms.iph.tos = p->iph.tos;
893 t->parms.iph.frag_off = p->iph.frag_off;
895 if (t->parms.link != p->link || t->fwmark != fwmark) {
898 WRITE_ONCE(t->parms.link, p->link);
923 memcpy(p, &t->parms, sizeof(*p));
1132 return READ_ONCE(tunnel->parms.link);
1140 struct ip_tunnel_parm_kern parms;
1156 memset(&parms, 0, sizeof(parms));
1158 strscpy(parms.name, devname, IFNAMSIZ);
1161 itn->fb_tunnel_dev = __ip_tunnel_create(net, ops, &parms);
1227 nt->parms = *p;
1301 struct iphdr *iph = &tunnel->parms.iph;
1319 strscpy(tunnel->parms.name, dev->name);