#define fl4_scope flowi_scope
union flowi_uli uli_u;
-#define fl_ip_sport uli_u.ports.sport
-#define fl_ip_dport uli_u.ports.dport
-#define fl_icmp_type uli_u.icmpt.type
-#define fl_icmp_code uli_u.icmpt.code
-#define fl_ipsec_spi uli_u.spi
-#define fl_mh_type uli_u.mht.type
-#define fl_gre_key uli_u.gre_key
+#define fl4_sport uli_u.ports.sport
+#define fl4_dport uli_u.ports.dport
+#define fl4_icmp_type uli_u.icmpt.type
+#define fl4_icmp_code uli_u.icmpt.code
+#define fl4_ipsec_spi uli_u.spi
+#define fl4_mh_type uli_u.mht.type
+#define fl4_gre_key uli_u.gre_key
+#define fl6_sport uli_u.ports.sport
+#define fl6_dport uli_u.ports.dport
+#define fl6_icmp_type uli_u.icmpt.type
+#define fl6_icmp_code uli_u.icmpt.code
+#define fl6_ipsec_spi uli_u.spi
+#define fl6_mh_type uli_u.mht.type
+#define fl6_gre_key uli_u.gre_key
} __attribute__((__aligned__(BITS_PER_LONG/8)));
#define FLOW_DIR_IN 0
.fl4_src = saddr,
.fl4_tos = tos,
.flowi_proto = proto,
- .fl_ip_dport = dport,
- .fl_ip_sport = sport,
+ .fl4_dport = dport,
+ .fl4_sport = sport,
};
if (sk)
security_sk_classify_flow(sk, &fl);
.fl4_src = saddr,
.fl4_tos = tos,
.flowi_proto = IPPROTO_GRE,
- .fl_gre_key = gre_key,
+ .fl4_gre_key = gre_key,
};
return ip_route_output_key(net, &fl);
}
__be16 sport, __be16 dport,
struct sock *sk, bool can_sleep)
{
- struct flowi fl = { .flowi_oif = oif,
- .flowi_mark = sk->sk_mark,
- .fl4_dst = dst,
- .fl4_src = src,
- .fl4_tos = tos,
- .flowi_proto = protocol,
- .fl_ip_sport = sport,
- .fl_ip_dport = dport };
+ struct flowi fl = {
+ .flowi_oif = oif,
+ .flowi_mark = sk->sk_mark,
+ .fl4_dst = dst,
+ .fl4_src = src,
+ .fl4_tos = tos,
+ .flowi_proto = protocol,
+ .fl4_sport = sport,
+ .fl4_dport = dport,
+ };
struct net *net = sock_net(sk);
struct rtable *rt;
__be16 dport, struct sock *sk)
{
if (sport != orig_sport || dport != orig_dport) {
- struct flowi fl = { .flowi_oif = rt->rt_oif,
- .flowi_mark = rt->rt_mark,
- .fl4_dst = rt->rt_key_dst,
- .fl4_src = rt->rt_key_src,
- .fl4_tos = rt->rt_tos,
- .flowi_proto = protocol,
- .fl_ip_sport = sport,
- .fl_ip_dport = dport };
-
+ struct flowi fl = {
+ .flowi_oif = rt->rt_oif,
+ .flowi_mark = rt->rt_mark,
+ .fl4_dst = rt->rt_key_dst,
+ .fl4_src = rt->rt_key_src,
+ .fl4_tos = rt->rt_tos,
+ .flowi_proto = protocol,
+ .fl4_sport = sport,
+ .fl4_dport = dport
+ };
if (inet_sk(sk)->transparent)
fl.flowi_flags |= FLOWI_FLAG_ANYSRC;
if (protocol == IPPROTO_TCP)
}
static __inline__
-__be16 xfrm_flowi_sport(const struct flowi *fl)
+__be16 xfrm_flowi_sport(const struct flowi *fl, const union flowi_uli *uli)
{
__be16 port;
switch(fl->flowi_proto) {
case IPPROTO_UDP:
case IPPROTO_UDPLITE:
case IPPROTO_SCTP:
- port = fl->fl_ip_sport;
+ port = uli->ports.sport;
break;
case IPPROTO_ICMP:
case IPPROTO_ICMPV6:
- port = htons(fl->fl_icmp_type);
+ port = htons(uli->icmpt.type);
break;
case IPPROTO_MH:
- port = htons(fl->fl_mh_type);
+ port = htons(uli->mht.type);
break;
case IPPROTO_GRE:
- port = htons(ntohl(fl->fl_gre_key) >> 16);
+ port = htons(ntohl(uli->gre_key) >> 16);
break;
default:
port = 0; /*XXX*/
}
static __inline__
-__be16 xfrm_flowi_dport(const struct flowi *fl)
+__be16 xfrm_flowi_dport(const struct flowi *fl, const union flowi_uli *uli)
{
__be16 port;
switch(fl->flowi_proto) {
case IPPROTO_UDP:
case IPPROTO_UDPLITE:
case IPPROTO_SCTP:
- port = fl->fl_ip_dport;
+ port = uli->ports.dport;
break;
case IPPROTO_ICMP:
case IPPROTO_ICMPV6:
- port = htons(fl->fl_icmp_code);
+ port = htons(uli->icmpt.code);
break;
case IPPROTO_GRE:
- port = htons(ntohl(fl->fl_gre_key) & 0xffff);
+ port = htons(ntohl(uli->gre_key) & 0xffff);
break;
default:
port = 0; /*XXX*/
.fl4_src = ip_hdr(skb)->daddr,
.fl4_tos = RT_CONN_FLAGS(sk),
.flowi_proto = sk->sk_protocol,
- .fl_ip_sport = dccp_hdr(skb)->dccph_dport,
- .fl_ip_dport = dccp_hdr(skb)->dccph_sport,
+ .fl4_sport = dccp_hdr(skb)->dccph_dport,
+ .fl4_dport = dccp_hdr(skb)->dccph_sport,
};
security_skb_classify_flow(skb, &fl);
ipv6_addr_copy(&fl.fl6_dst, &np->daddr);
ipv6_addr_copy(&fl.fl6_src, &np->saddr);
fl.flowi_oif = sk->sk_bound_dev_if;
- fl.fl_ip_dport = inet->inet_dport;
- fl.fl_ip_sport = inet->inet_sport;
+ fl.fl6_dport = inet->inet_dport;
+ fl.fl6_sport = inet->inet_sport;
security_sk_classify_flow(sk, &fl);
dst = ip6_dst_lookup_flow(sk, &fl, NULL, false);
ipv6_addr_copy(&fl.fl6_src, &ireq6->loc_addr);
fl.fl6_flowlabel = 0;
fl.flowi_oif = ireq6->iif;
- fl.fl_ip_dport = inet_rsk(req)->rmt_port;
- fl.fl_ip_sport = inet_rsk(req)->loc_port;
+ fl.fl6_dport = inet_rsk(req)->rmt_port;
+ fl.fl6_sport = inet_rsk(req)->loc_port;
security_req_classify_flow(req, &fl);
opt = np->opt;
fl.flowi_proto = IPPROTO_DCCP;
fl.flowi_oif = inet6_iif(rxskb);
- fl.fl_ip_dport = dccp_hdr(skb)->dccph_dport;
- fl.fl_ip_sport = dccp_hdr(skb)->dccph_sport;
+ fl.fl6_dport = dccp_hdr(skb)->dccph_dport;
+ fl.fl6_sport = dccp_hdr(skb)->dccph_sport;
security_skb_classify_flow(rxskb, &fl);
/* sk = NULL, but it is safe for now. RST socket required. */
final_p = fl6_update_dst(&fl, opt, &final);
ipv6_addr_copy(&fl.fl6_src, &ireq6->loc_addr);
fl.flowi_oif = sk->sk_bound_dev_if;
- fl.fl_ip_dport = inet_rsk(req)->rmt_port;
- fl.fl_ip_sport = inet_rsk(req)->loc_port;
+ fl.fl6_dport = inet_rsk(req)->rmt_port;
+ fl.fl6_sport = inet_rsk(req)->loc_port;
security_sk_classify_flow(sk, &fl);
dst = ip6_dst_lookup_flow(sk, &fl, final_p, false);
ipv6_addr_copy(&fl.fl6_dst, &np->daddr);
ipv6_addr_copy(&fl.fl6_src, saddr ? saddr : &np->saddr);
fl.flowi_oif = sk->sk_bound_dev_if;
- fl.fl_ip_dport = usin->sin6_port;
- fl.fl_ip_sport = inet->inet_sport;
+ fl.fl6_dport = usin->sin6_port;
+ fl.fl6_sport = inet->inet_sport;
security_sk_classify_flow(sk, &fl);
final_p = fl6_update_dst(&fl, np->opt, &final);
.fl4_src = saddr,
.fl4_tos = RT_TOS(tos),
.flowi_proto = IPPROTO_ICMP,
- .fl_icmp_type = type,
- .fl_icmp_code = code,
+ .fl4_icmp_type = type,
+ .fl4_icmp_code = code,
};
struct rtable *rt, *rt2;
int err;
.fl4_tos = RT_CONN_FLAGS(sk),
.flowi_proto = sk->sk_protocol,
.flowi_flags = inet_sk_flowi_flags(sk),
- .fl_ip_sport = inet_sk(sk)->inet_sport,
- .fl_ip_dport = ireq->rmt_port,
+ .fl4_sport = inet_sk(sk)->inet_sport,
+ .fl4_dport = ireq->rmt_port,
};
struct net *net = sock_net(sk);
.fl4_dst = daddr,
.fl4_src = rt->rt_spec_dst,
.fl4_tos = RT_TOS(ip_hdr(skb)->tos),
- .fl_ip_sport = tcp_hdr(skb)->dest,
- .fl_ip_dport = tcp_hdr(skb)->source,
+ .fl4_sport = tcp_hdr(skb)->dest,
+ .fl4_dport = tcp_hdr(skb)->source,
.flowi_proto = sk->sk_protocol,
.flowi_flags = ip_reply_arg_flowi_flags(arg),
};
t->dst.protonum == IPPROTO_UDPLITE ||
t->dst.protonum == IPPROTO_DCCP ||
t->dst.protonum == IPPROTO_SCTP)
- fl->fl_ip_dport = t->dst.u.tcp.port;
+ fl->fl4_dport = t->dst.u.tcp.port;
}
statusbit ^= IPS_NAT_MASK;
t->dst.protonum == IPPROTO_UDPLITE ||
t->dst.protonum == IPPROTO_DCCP ||
t->dst.protonum == IPPROTO_SCTP)
- fl->fl_ip_sport = t->src.u.tcp.port;
+ fl->fl4_sport = t->src.u.tcp.port;
}
}
#endif
code = iov->iov_base;
if (type && code) {
- if (get_user(fl->fl_icmp_type, type) ||
- get_user(fl->fl_icmp_code, code))
+ if (get_user(fl->fl4_icmp_type, type) ||
+ get_user(fl->fl4_icmp_code, code))
return -EFAULT;
probed = 1;
}
.fl4_tos = RT_CONN_FLAGS(sk),
.flowi_proto = IPPROTO_TCP,
.flowi_flags = inet_sk_flowi_flags(sk),
- .fl_ip_sport = th->dest,
- .fl_ip_dport = th->source,
+ .fl4_sport = th->dest,
+ .fl4_dport = th->source,
};
security_req_classify_flow(req, &fl);
rt = ip_route_output_key(sock_net(sk), &fl);
if (!skb)
goto out;
- err = udp_send_skb(skb, fl->fl4_dst, fl->fl_ip_dport);
+ err = udp_send_skb(skb, fl->fl4_dst, fl->fl4_dport);
out:
up->len = 0;
.flowi_proto = sk->sk_protocol,
.flowi_flags = (inet_sk_flowi_flags(sk) |
FLOWI_FLAG_CAN_SLEEP),
- .fl_ip_sport = inet->inet_sport,
- .fl_ip_dport = dport,
+ .fl4_sport = inet->inet_sport,
+ .fl4_dport = dport,
};
struct net *net = sock_net(sk);
* Now cork the socket to pend data.
*/
inet->cork.fl.fl4_dst = daddr;
- inet->cork.fl.fl_ip_dport = dport;
+ inet->cork.fl.fl4_dport = dport;
inet->cork.fl.fl4_src = saddr;
- inet->cork.fl.fl_ip_sport = inet->inet_sport;
+ inet->cork.fl.fl4_sport = inet->inet_sport;
up->pending = AF_INET;
do_append_data:
pskb_may_pull(skb, xprth + 4 - skb->data)) {
__be16 *ports = (__be16 *)xprth;
- fl->fl_ip_sport = ports[!!reverse];
- fl->fl_ip_dport = ports[!reverse];
+ fl->fl4_sport = ports[!!reverse];
+ fl->fl4_dport = ports[!reverse];
}
break;
if (pskb_may_pull(skb, xprth + 2 - skb->data)) {
u8 *icmp = xprth;
- fl->fl_icmp_type = icmp[0];
- fl->fl_icmp_code = icmp[1];
+ fl->fl4_icmp_type = icmp[0];
+ fl->fl4_icmp_code = icmp[1];
}
break;
if (pskb_may_pull(skb, xprth + 4 - skb->data)) {
__be32 *ehdr = (__be32 *)xprth;
- fl->fl_ipsec_spi = ehdr[0];
+ fl->fl4_ipsec_spi = ehdr[0];
}
break;
if (pskb_may_pull(skb, xprth + 8 - skb->data)) {
__be32 *ah_hdr = (__be32*)xprth;
- fl->fl_ipsec_spi = ah_hdr[1];
+ fl->fl4_ipsec_spi = ah_hdr[1];
}
break;
if (pskb_may_pull(skb, xprth + 4 - skb->data)) {
__be16 *ipcomp_hdr = (__be16 *)xprth;
- fl->fl_ipsec_spi = htonl(ntohs(ipcomp_hdr[1]));
+ fl->fl4_ipsec_spi = htonl(ntohs(ipcomp_hdr[1]));
}
break;
if (greflags[0] & GRE_KEY) {
if (greflags[0] & GRE_CSUM)
gre_hdr++;
- fl->fl_gre_key = gre_hdr[1];
+ fl->fl4_gre_key = gre_hdr[1];
}
}
break;
default:
- fl->fl_ipsec_spi = 0;
+ fl->fl4_ipsec_spi = 0;
break;
}
}
{
sel->daddr.a4 = fl->fl4_dst;
sel->saddr.a4 = fl->fl4_src;
- sel->dport = xfrm_flowi_dport(fl);
+ sel->dport = xfrm_flowi_dport(fl, &fl->uli_u);
sel->dport_mask = htons(0xffff);
- sel->sport = xfrm_flowi_sport(fl);
+ sel->sport = xfrm_flowi_sport(fl, &fl->uli_u);
sel->sport_mask = htons(0xffff);
sel->family = AF_INET;
sel->prefixlen_d = 32;
fl.fl6_flowlabel = np->flow_label;
fl.flowi_oif = sk->sk_bound_dev_if;
fl.flowi_mark = sk->sk_mark;
- fl.fl_ip_dport = inet->inet_dport;
- fl.fl_ip_sport = inet->inet_sport;
+ fl.fl6_dport = inet->inet_dport;
+ fl.fl6_sport = inet->inet_sport;
security_sk_classify_flow(sk, &fl);
final_p = fl6_update_dst(&fl, np->opt, &final);
ipv6_addr_copy(&fl.fl6_src, &np->saddr);
fl.flowi_oif = sk->sk_bound_dev_if;
fl.flowi_mark = sk->sk_mark;
- fl.fl_ip_dport = inet->inet_dport;
- fl.fl_ip_sport = inet->inet_sport;
+ fl.fl6_dport = inet->inet_dport;
+ fl.fl6_sport = inet->inet_sport;
if (!fl.flowi_oif && (addr_type&IPV6_ADDR_MULTICAST))
fl.flowi_oif = np->mcast_oif;
serr->ee.ee_info = info;
serr->ee.ee_data = 0;
serr->addr_offset = (u8 *)&iph->daddr - skb_network_header(skb);
- serr->port = fl->fl_ip_dport;
+ serr->port = fl->fl6_dport;
__skb_pull(skb, skb_tail_pointer(skb) - skb->data);
skb_reset_transport_header(skb);
if (saddr)
ipv6_addr_copy(&fl.fl6_src, saddr);
fl.flowi_oif = iif;
- fl.fl_icmp_type = type;
- fl.fl_icmp_code = code;
+ fl.fl6_icmp_type = type;
+ fl.fl6_icmp_code = code;
security_skb_classify_flow(skb, &fl);
sk = icmpv6_xmit_lock(net);
if (saddr)
ipv6_addr_copy(&fl.fl6_src, saddr);
fl.flowi_oif = skb->dev->ifindex;
- fl.fl_icmp_type = ICMPV6_ECHO_REPLY;
+ fl.fl6_icmp_type = ICMPV6_ECHO_REPLY;
security_skb_classify_flow(skb, &fl);
sk = icmpv6_xmit_lock(net);
ipv6_addr_copy(&fl->fl6_src, saddr);
ipv6_addr_copy(&fl->fl6_dst, daddr);
fl->flowi_proto = IPPROTO_ICMPV6;
- fl->fl_icmp_type = type;
- fl->fl_icmp_code = 0;
+ fl->fl6_icmp_type = type;
+ fl->fl6_icmp_code = 0;
fl->flowi_oif = oif;
security_sk_classify_flow(sk, fl);
}
ipv6_addr_copy(&fl.fl6_src, &treq->loc_addr);
fl.flowi_oif = sk->sk_bound_dev_if;
fl.flowi_mark = sk->sk_mark;
- fl.fl_ip_dport = inet_rsk(req)->rmt_port;
- fl.fl_ip_sport = inet_rsk(req)->loc_port;
+ fl.fl6_dport = inet_rsk(req)->rmt_port;
+ fl.fl6_sport = inet_rsk(req)->loc_port;
security_req_classify_flow(req, &fl);
dst = ip6_dst_lookup_flow(sk, &fl, final_p, false);
IP6_ECN_flow_xmit(sk, fl.fl6_flowlabel);
fl.flowi_oif = sk->sk_bound_dev_if;
fl.flowi_mark = sk->sk_mark;
- fl.fl_ip_sport = inet->inet_sport;
- fl.fl_ip_dport = inet->inet_dport;
+ fl.fl6_sport = inet->inet_sport;
+ fl.fl6_dport = inet->inet_dport;
security_sk_classify_flow(sk, &fl);
final_p = fl6_update_dst(&fl, np->opt, &final);
int err = 0;
if (unlikely(fl->flowi_proto == IPPROTO_MH &&
- fl->fl_mh_type <= IP6_MH_TYPE_MAX))
+ fl->fl6_mh_type <= IP6_MH_TYPE_MAX))
goto out;
if (likely(opt->dsthao)) {
sel.prefixlen_s = 128;
sel.family = AF_INET6;
sel.proto = fl->flowi_proto;
- sel.dport = xfrm_flowi_dport(fl);
+ sel.dport = xfrm_flowi_dport(fl, &fl->uli_u);
if (sel.dport)
sel.dport_mask = htons(~0);
- sel.sport = xfrm_flowi_sport(fl);
+ sel.sport = xfrm_flowi_sport(fl, &fl->uli_u);
if (sel.sport)
sel.sport_mask = htons(~0);
sel.ifindex = fl->flowi_oif;
fl.flowi_proto = IPPROTO_TCP;
ipv6_addr_copy(&fl.fl6_src, &oip6h->daddr);
ipv6_addr_copy(&fl.fl6_dst, &oip6h->saddr);
- fl.fl_ip_sport = otcph.dest;
- fl.fl_ip_dport = otcph.source;
+ fl.fl6_sport = otcph.dest;
+ fl.fl6_dport = otcph.source;
security_skb_classify_flow(oldskb, &fl);
dst = ip6_route_output(net, NULL, &fl);
if (dst == NULL || dst->error) {
code = iov->iov_base;
if (type && code) {
- if (get_user(fl->fl_icmp_type, type) ||
- get_user(fl->fl_icmp_code, code))
+ if (get_user(fl->fl6_icmp_type, type) ||
+ get_user(fl->fl6_icmp_code, code))
return -EFAULT;
probed = 1;
}
/* check if type field is readable or not. */
if (iov->iov_len > 2 - len) {
u8 __user *p = iov->iov_base;
- if (get_user(fl->fl_mh_type, &p[2 - len]))
+ if (get_user(fl->fl6_mh_type, &p[2 - len]))
return -EFAULT;
probed = 1;
} else
ipv6_addr_copy(&fl.fl6_src, &ireq6->loc_addr);
fl.flowi_oif = sk->sk_bound_dev_if;
fl.flowi_mark = sk->sk_mark;
- fl.fl_ip_dport = inet_rsk(req)->rmt_port;
- fl.fl_ip_sport = inet_sk(sk)->inet_sport;
+ fl.fl6_dport = inet_rsk(req)->rmt_port;
+ fl.fl6_sport = inet_sk(sk)->inet_sport;
security_req_classify_flow(req, &fl);
dst = ip6_dst_lookup_flow(sk, &fl, final_p, false);
(saddr ? saddr : &np->saddr));
fl.flowi_oif = sk->sk_bound_dev_if;
fl.flowi_mark = sk->sk_mark;
- fl.fl_ip_dport = usin->sin6_port;
- fl.fl_ip_sport = inet->inet_sport;
+ fl.fl6_dport = usin->sin6_port;
+ fl.fl6_sport = inet->inet_sport;
final_p = fl6_update_dst(&fl, np->opt, &final);
ipv6_addr_copy(&fl.fl6_src, &np->saddr);
fl.flowi_oif = sk->sk_bound_dev_if;
fl.flowi_mark = sk->sk_mark;
- fl.fl_ip_dport = inet->inet_dport;
- fl.fl_ip_sport = inet->inet_sport;
+ fl.fl6_dport = inet->inet_dport;
+ fl.fl6_sport = inet->inet_sport;
security_skb_classify_flow(skb, &fl);
dst = ip6_dst_lookup_flow(sk, &fl, NULL, false);
fl.fl6_flowlabel = 0;
fl.flowi_oif = treq->iif;
fl.flowi_mark = sk->sk_mark;
- fl.fl_ip_dport = inet_rsk(req)->rmt_port;
- fl.fl_ip_sport = inet_rsk(req)->loc_port;
+ fl.fl6_dport = inet_rsk(req)->rmt_port;
+ fl.fl6_sport = inet_rsk(req)->loc_port;
security_req_classify_flow(req, &fl);
opt = np->opt;
fl.flowi_proto = IPPROTO_TCP;
fl.flowi_oif = inet6_iif(skb);
- fl.fl_ip_dport = t1->dest;
- fl.fl_ip_sport = t1->source;
+ fl.fl6_dport = t1->dest;
+ fl.fl6_sport = t1->source;
security_skb_classify_flow(skb, &fl);
/* Pass a socket to ip6_dst_lookup either it is for RST
* Create a UDP header
*/
uh = udp_hdr(skb);
- uh->source = fl->fl_ip_sport;
- uh->dest = fl->fl_ip_dport;
+ uh->source = fl->fl6_sport;
+ uh->dest = fl->fl6_dport;
uh->len = htons(up->len);
uh->check = 0;
if (sin6->sin6_port == 0)
return -EINVAL;
- fl.fl_ip_dport = sin6->sin6_port;
+ fl.fl6_dport = sin6->sin6_port;
daddr = &sin6->sin6_addr;
if (np->sndflow) {
if (sk->sk_state != TCP_ESTABLISHED)
return -EDESTADDRREQ;
- fl.fl_ip_dport = inet->inet_dport;
+ fl.fl6_dport = inet->inet_dport;
daddr = &np->daddr;
fl.fl6_flowlabel = np->flow_label;
connected = 1;
fl.fl6_dst.s6_addr[15] = 0x1; /* :: means loopback (BSD'ism) */
if (ipv6_addr_any(&fl.fl6_src) && !ipv6_addr_any(&np->saddr))
ipv6_addr_copy(&fl.fl6_src, &np->saddr);
- fl.fl_ip_sport = inet->inet_sport;
+ fl.fl6_sport = inet->inet_sport;
final_p = fl6_update_dst(&fl, opt, &final);
if (final_p)
pskb_may_pull(skb, nh + offset + 4 - skb->data))) {
__be16 *ports = (__be16 *)exthdr;
- fl->fl_ip_sport = ports[!!reverse];
- fl->fl_ip_dport = ports[!reverse];
+ fl->fl6_sport = ports[!!reverse];
+ fl->fl6_dport = ports[!reverse];
}
fl->flowi_proto = nexthdr;
return;
if (!onlyproto && pskb_may_pull(skb, nh + offset + 2 - skb->data)) {
u8 *icmp = (u8 *)exthdr;
- fl->fl_icmp_type = icmp[0];
- fl->fl_icmp_code = icmp[1];
+ fl->fl6_icmp_type = icmp[0];
+ fl->fl6_icmp_code = icmp[1];
}
fl->flowi_proto = nexthdr;
return;
struct ip6_mh *mh;
mh = (struct ip6_mh *)exthdr;
- fl->fl_mh_type = mh->ip6mh_type;
+ fl->fl6_mh_type = mh->ip6mh_type;
}
fl->flowi_proto = nexthdr;
return;
case IPPROTO_ESP:
case IPPROTO_COMP:
default:
- fl->fl_ipsec_spi = 0;
+ fl->fl6_ipsec_spi = 0;
fl->flowi_proto = nexthdr;
return;
}
* to current session. */
ipv6_addr_copy((struct in6_addr *)&sel->daddr, &fl->fl6_dst);
ipv6_addr_copy((struct in6_addr *)&sel->saddr, &fl->fl6_src);
- sel->dport = xfrm_flowi_dport(fl);
+ sel->dport = xfrm_flowi_dport(fl, &fl->uli_u);
sel->dport_mask = htons(0xffff);
- sel->sport = xfrm_flowi_sport(fl);
+ sel->sport = xfrm_flowi_sport(fl, &fl->uli_u);
sel->sport_mask = htons(0xffff);
sel->family = AF_INET6;
sel->prefixlen_d = 128;
memset(&fl, 0x0, sizeof(struct flowi));
fl.fl4_dst = daddr->v4.sin_addr.s_addr;
- fl.fl_ip_dport = daddr->v4.sin_port;
+ fl.fl4_dport = daddr->v4.sin_port;
fl.flowi_proto = IPPROTO_SCTP;
if (asoc) {
fl.fl4_tos = RT_CONN_FLAGS(asoc->base.sk);
fl.flowi_oif = asoc->base.sk->sk_bound_dev_if;
- fl.fl_ip_sport = htons(asoc->base.bind_addr.port);
+ fl.fl4_sport = htons(asoc->base.bind_addr.port);
}
if (saddr) {
fl.fl4_src = saddr->v4.sin_addr.s_addr;
- fl.fl_ip_sport = saddr->v4.sin_port;
+ fl.fl4_sport = saddr->v4.sin_port;
}
SCTP_DEBUG_PRINTK("%s: DST:%pI4, SRC:%pI4 - ",
if ((laddr->state == SCTP_ADDR_SRC) &&
(AF_INET == laddr->a.sa.sa_family)) {
fl.fl4_src = laddr->a.v4.sin_addr.s_addr;
- fl.fl_ip_sport = laddr->a.v4.sin_port;
+ fl.fl4_sport = laddr->a.v4.sin_port;
rt = ip_route_output_key(&init_net, &fl);
if (!IS_ERR(rt)) {
dst = &rt->dst;
{
return addr_match(&fl->fl4_dst, &sel->daddr, sel->prefixlen_d) &&
addr_match(&fl->fl4_src, &sel->saddr, sel->prefixlen_s) &&
- !((xfrm_flowi_dport(fl) ^ sel->dport) & sel->dport_mask) &&
- !((xfrm_flowi_sport(fl) ^ sel->sport) & sel->sport_mask) &&
+ !((xfrm_flowi_dport(fl, &fl->uli_u) ^ sel->dport) & sel->dport_mask) &&
+ !((xfrm_flowi_sport(fl, &fl->uli_u) ^ sel->sport) & sel->sport_mask) &&
(fl->flowi_proto == sel->proto || !sel->proto) &&
(fl->flowi_oif == sel->ifindex || !sel->ifindex);
}
{
return addr_match(&fl->fl6_dst, &sel->daddr, sel->prefixlen_d) &&
addr_match(&fl->fl6_src, &sel->saddr, sel->prefixlen_s) &&
- !((xfrm_flowi_dport(fl) ^ sel->dport) & sel->dport_mask) &&
- !((xfrm_flowi_sport(fl) ^ sel->sport) & sel->sport_mask) &&
+ !((xfrm_flowi_dport(fl, &fl->uli_u) ^ sel->dport) & sel->dport_mask) &&
+ !((xfrm_flowi_sport(fl, &fl->uli_u) ^ sel->sport) & sel->sport_mask) &&
(fl->flowi_proto == sel->proto || !sel->proto) &&
(fl->flowi_oif == sel->ifindex || !sel->ifindex);
}