git: 274a0e4a8d81 - main - sctp: cleanup, no functional change intended.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 18 Feb 2022 16:15:19 UTC
The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=274a0e4a8d817d88ce7e3d40c4aad71db102c6ff commit 274a0e4a8d817d88ce7e3d40c4aad71db102c6ff Author: Michael Tuexen <tuexen@FreeBSD.org> AuthorDate: 2022-02-18 13:20:01 +0000 Commit: Michael Tuexen <tuexen@FreeBSD.org> CommitDate: 2022-02-18 13:20:01 +0000 sctp: cleanup, no functional change intended. MFC after: 3 days --- sys/netinet/sctp_os_bsd.h | 1 - sys/netinet/sctp_pcb.c | 7 ++++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/sys/netinet/sctp_os_bsd.h b/sys/netinet/sctp_os_bsd.h index 4d2c40b59a4b..7d5cef6d5f09 100644 --- a/sys/netinet/sctp_os_bsd.h +++ b/sys/netinet/sctp_os_bsd.h @@ -315,7 +315,6 @@ typedef struct callout sctp_os_timer_t; /*************************/ #define SCTP_GATHER_MTU_FROM_IFN_INFO(ifn, ifn_index) ((struct ifnet *)ifn)->if_mtu #define SCTP_GATHER_MTU_FROM_ROUTE(sctp_ifa, sa, nh) ((uint32_t)((nh != NULL) ? nh->nh_mtu : 0)) -#define SCTP_GATHER_MTU_FROM_INTFC(sctp_ifn) ((sctp_ifn->ifn_p != NULL) ? ((struct ifnet *)(sctp_ifn->ifn_p))->if_mtu : 0) /*************************/ /* These are for logging */ diff --git a/sys/netinet/sctp_pcb.c b/sys/netinet/sctp_pcb.c index 150039ade302..00bb25ecb96d 100644 --- a/sys/netinet/sctp_pcb.c +++ b/sys/netinet/sctp_pcb.c @@ -3969,7 +3969,12 @@ sctp_add_remote_addr(struct sctp_tcb *stcb, struct sockaddr *newaddr, net->src_addr_selected = 1; /* Now get the interface MTU */ if (net->ro._s_addr->ifn_p != NULL) { - imtu = SCTP_GATHER_MTU_FROM_INTFC(net->ro._s_addr->ifn_p); + /* + * XXX: Should we here just use + * net->ro._s_addr->ifn_p->ifn_mtu + */ + imtu = SCTP_GATHER_MTU_FROM_IFN_INFO(net->ro._s_addr->ifn_p->ifn_p, + net->ro._s_addr->ifn_p->ifn_index); } else { imtu = 0; }