ip6_output() has a complex set of gotos, and some can jump out of
the epoch section towards return statement. Since entering epoch is cheap, it is easier to cover the whole function with epoch, rather than try to properly maintain its state.
This commit is contained in:
parent
975b8f8462
commit
1e4f4e56b9
@ -405,6 +405,8 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt,
|
||||
struct m_tag *fwd_tag = NULL;
|
||||
uint32_t id;
|
||||
|
||||
NET_EPOCH_ENTER(et);
|
||||
|
||||
if (inp != NULL) {
|
||||
INP_LOCK_ASSERT(inp);
|
||||
M_SETFIB(m, inp->inp_inc.inc_fibnum);
|
||||
@ -587,7 +589,6 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt,
|
||||
ro = &opt->ip6po_route;
|
||||
dst = (struct sockaddr_in6 *)&ro->ro_dst;
|
||||
fibnum = (inp != NULL) ? inp->inp_inc.inc_fibnum : M_GETFIB(m);
|
||||
NET_EPOCH_ENTER(et);
|
||||
again:
|
||||
/*
|
||||
* if specified, try to fill in the traffic class field.
|
||||
|
Loading…
x
Reference in New Issue
Block a user