sctp: cleanup, no functional change intended.

MFC after:	3 days
This commit is contained in:
Michael Tuexen 2022-02-18 14:20:01 +01:00
parent 3931c072c6
commit 274a0e4a8d
2 changed files with 6 additions and 2 deletions

View File

@ -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 */

View File

@ -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;
}