diff options
author | adrian <adrian@FreeBSD.org> | 2014-09-09 00:21:21 +0000 |
---|---|---|
committer | adrian <adrian@FreeBSD.org> | 2014-09-09 00:21:21 +0000 |
commit | 4f769d2ecf996b927b7da791e339653a8036f4af (patch) | |
tree | 525151b7e008bcfcc5ac79877cfe5d34452730e3 /sys/netinet6/ip6_output.c | |
parent | aab402c146b80d8b48db0272ba9cbab2988b4377 (diff) | |
download | FreeBSD-src-4f769d2ecf996b927b7da791e339653a8036f4af.zip FreeBSD-src-4f769d2ecf996b927b7da791e339653a8036f4af.tar.gz |
Add IP_NODEFAULTFLOWID awareness to ip6_output().
Differential Revision: https://reviews.freebsd.org/D527
Diffstat (limited to 'sys/netinet6/ip6_output.c')
-rw-r--r-- | sys/netinet6/ip6_output.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/sys/netinet6/ip6_output.c b/sys/netinet6/ip6_output.c index 6f2e892..4fae817 100644 --- a/sys/netinet6/ip6_output.c +++ b/sys/netinet6/ip6_output.c @@ -227,6 +227,9 @@ in6_delayed_cksum(struct mbuf *m, uint32_t plen, u_short offset) * * ifpp - XXX: just for statistics */ +/* + * XXX TODO: no flowid is assigned for outbound flows? + */ int ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, struct route_in6 *ro, int flags, struct ip6_moptions *im6o, @@ -260,8 +263,14 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, goto bad; } - if (inp != NULL) + if (inp != NULL) { M_SETFIB(m, inp->inp_inc.inc_fibnum); + if (((flags & IP_NODEFAULTFLOWID) == 0) && + (inp->inp_flags & (INP_HW_FLOWID|INP_SW_FLOWID))) { + m->m_pkthdr.flowid = inp->inp_flowid; + m->m_flags |= M_FLOWID; + } + } finaldst = ip6->ip6_dst; bzero(&exthdrs, sizeof(exthdrs)); |