aboutsummaryrefslogtreecommitdiff
path: root/sys/netinet/sctp_pcb.c
diff options
context:
space:
mode:
authorBjoern A. Zeeb <bz@FreeBSD.org>2019-08-02 07:41:36 +0000
committerBjoern A. Zeeb <bz@FreeBSD.org>2019-08-02 07:41:36 +0000
commit0ecd976e80a826a0936a886643d147a1a3c9006c (patch)
tree2643bb59cdbc1fc1bb650f64d570c0e725820eb7 /sys/netinet/sctp_pcb.c
parent8dafbebdd70a0f160394d64af01fbe3aeae888fb (diff)
downloadsrc-0ecd976e80a826a0936a886643d147a1a3c9006c.tar.gz
src-0ecd976e80a826a0936a886643d147a1a3c9006c.zip
IPv6 cleanup: kernel
Finish what was started a few years ago and harmonize IPv6 and IPv4 kernel names. We are down to very few places now that it is feasible to do the change for everything remaining with causing too much disturbance. Remove "aliases" for IPv6 names which confusingly could indicate that we are talking about a different data structure or field or have two fields, one for each address family. Try to follow common conventions used in FreeBSD. * Rename sin6p to sin6 as that is how it is spelt in most places. * Remove "aliases" (#defines) for: - in6pcb which really is an inpcb and nothing separate - sotoin6pcb which is sotoinpcb (as per above) - in6p_sp which is inp_sp - in6p_flowinfo which is inp_flow * Try to use ia6 for in6_addr rather than in6p. * With all these gone also rename the in6p variables to inp as that is what we call it in most of the network stack including parts of netinet6. The reasons behind this cleanup are that we try to further unify netinet and netinet6 code where possible and that people will less ignore one or the other protocol family when doing code changes as they may not have spotted places due to different names for the same thing. No functional changes. Discussed with: tuexen (SCTP changes) MFC after: 3 months Sponsored by: Netflix
Notes
Notes: svn path=/head/; revision=350531
Diffstat (limited to 'sys/netinet/sctp_pcb.c')
-rw-r--r--sys/netinet/sctp_pcb.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/sys/netinet/sctp_pcb.c b/sys/netinet/sctp_pcb.c
index 3c9268bf25aa..03fa40462dc5 100644
--- a/sys/netinet/sctp_pcb.c
+++ b/sys/netinet/sctp_pcb.c
@@ -3643,12 +3643,8 @@ sctp_inpcb_free(struct sctp_inpcb *inp, int immediate, int from)
#ifdef INET6
- if (ip_pcb->inp_vflag & INP_IPV6) {
- struct in6pcb *in6p;
-
- in6p = (struct in6pcb *)inp;
- ip6_freepcbopts(in6p->in6p_outputopts);
- }
+ if (ip_pcb->inp_vflag & INP_IPV6)
+ ip6_freepcbopts(((struct inpcb *)inp)->in6p_outputopts);
#endif /* INET6 */
ip_pcb->inp_vflag = 0;
/* free up authentication fields */