diff options
author | tuexen <tuexen@FreeBSD.org> | 2011-09-17 08:50:29 +0000 |
---|---|---|
committer | tuexen <tuexen@FreeBSD.org> | 2011-09-17 08:50:29 +0000 |
commit | 680b9f90a2df45c87f6be8100faa097073b497b7 (patch) | |
tree | 1c66f8080b5b5458c7b294565b24b6e003093597 /sys/netinet/sctp_pcb.c | |
parent | a5586859b8e8bec4079433cd96cd1cef0b10b335 (diff) | |
download | FreeBSD-src-680b9f90a2df45c87f6be8100faa097073b497b7.zip FreeBSD-src-680b9f90a2df45c87f6be8100faa097073b497b7.tar.gz |
Fix the enabling/disabling of Heartbeats and path MTU
discovery when using the SCTP_PEER_ADDR_PARAMS socket option.
Approved by: re
MFC after: 1 month.
Diffstat (limited to 'sys/netinet/sctp_pcb.c')
-rw-r--r-- | sys/netinet/sctp_pcb.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/netinet/sctp_pcb.c b/sys/netinet/sctp_pcb.c index b0f2880..9eb9a7d 100644 --- a/sys/netinet/sctp_pcb.c +++ b/sys/netinet/sctp_pcb.c @@ -4030,11 +4030,16 @@ sctp_add_remote_addr(struct sctp_tcb *stcb, struct sockaddr *newaddr, #ifdef INET6 net->flowlabel = stcb->asoc.default_flowlabel; #endif - if (sctp_is_feature_on(stcb->sctp_ep, SCTP_PCB_FLAGS_DONOT_HEARTBEAT)) { + if (sctp_stcb_is_feature_on(stcb->sctp_ep, stcb, SCTP_PCB_FLAGS_DONOT_HEARTBEAT)) { net->dest_state |= SCTP_ADDR_NOHB; } else { net->dest_state &= ~SCTP_ADDR_NOHB; } + if (sctp_stcb_is_feature_on(stcb->sctp_ep, stcb, SCTP_PCB_FLAGS_DO_NOT_PMTUD)) { + net->dest_state |= SCTP_ADDR_NO_PMTUD; + } else { + net->dest_state &= ~SCTP_ADDR_NO_PMTUD; + } net->heart_beat_delay = stcb->asoc.heart_beat_delay; /* Init the timer structure */ SCTP_OS_TIMER_INIT(&net->rxt_timer.timer); |