diff options
author | Vlad Yasevich <vladislav.yasevich@hp.com> | 2007-03-23 14:33:12 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-04-26 01:28:02 -0400 |
commit | bdf3092af601ccad765974652ab103162fbe14f4 (patch) | |
tree | a34ac81649e9620b64317994c6fb5091b06fca47 /include | |
parent | 1ae4114dce35dd1d32ed847f60b599dbbdfd5829 (diff) |
[SCTP]: Honor flags when setting peer address parameters
Parameters only take effect when a corresponding flag bit is set
and a value is specified. This means we need to check the flags
in addition to checking for non-zero value.
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/net/sctp/user.h | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/include/net/sctp/user.h b/include/net/sctp/user.h index 4ed752119bbc..80b7afea17fc 100644 --- a/include/net/sctp/user.h +++ b/include/net/sctp/user.h | |||
@@ -513,16 +513,17 @@ struct sctp_setadaptation { | |||
513 | * address's parameters: | 513 | * address's parameters: |
514 | */ | 514 | */ |
515 | enum sctp_spp_flags { | 515 | enum sctp_spp_flags { |
516 | SPP_HB_ENABLE = 1, /*Enable heartbeats*/ | 516 | SPP_HB_ENABLE = 1<<0, /*Enable heartbeats*/ |
517 | SPP_HB_DISABLE = 2, /*Disable heartbeats*/ | 517 | SPP_HB_DISABLE = 1<<1, /*Disable heartbeats*/ |
518 | SPP_HB = SPP_HB_ENABLE | SPP_HB_DISABLE, | 518 | SPP_HB = SPP_HB_ENABLE | SPP_HB_DISABLE, |
519 | SPP_HB_DEMAND = 4, /*Send heartbeat immediately*/ | 519 | SPP_HB_DEMAND = 1<<2, /*Send heartbeat immediately*/ |
520 | SPP_PMTUD_ENABLE = 8, /*Enable PMTU discovery*/ | 520 | SPP_PMTUD_ENABLE = 1<<3, /*Enable PMTU discovery*/ |
521 | SPP_PMTUD_DISABLE = 16, /*Disable PMTU discovery*/ | 521 | SPP_PMTUD_DISABLE = 1<<4, /*Disable PMTU discovery*/ |
522 | SPP_PMTUD = SPP_PMTUD_ENABLE | SPP_PMTUD_DISABLE, | 522 | SPP_PMTUD = SPP_PMTUD_ENABLE | SPP_PMTUD_DISABLE, |
523 | SPP_SACKDELAY_ENABLE = 32, /*Enable SACK*/ | 523 | SPP_SACKDELAY_ENABLE = 1<<5, /*Enable SACK*/ |
524 | SPP_SACKDELAY_DISABLE = 64, /*Disable SACK*/ | 524 | SPP_SACKDELAY_DISABLE = 1<<6, /*Disable SACK*/ |
525 | SPP_SACKDELAY = SPP_SACKDELAY_ENABLE | SPP_SACKDELAY_DISABLE, | 525 | SPP_SACKDELAY = SPP_SACKDELAY_ENABLE | SPP_SACKDELAY_DISABLE, |
526 | SPP_HB_TIME_IS_ZERO = 1<<7, /* Set HB delay to 0 */ | ||
526 | }; | 527 | }; |
527 | 528 | ||
528 | struct sctp_paddrparams { | 529 | struct sctp_paddrparams { |