Changeset View
Changeset View
Standalone View
Standalone View
sys/net/bridgestp.c
Show First 20 Lines • Show All 591 Lines • ▼ Show 20 Lines | bstp_received_bpdu(struct bstp_state *bs, struct bstp_port *bp, | ||||
/* We need to have transitioned to INFO_MINE before proceeding */ | /* We need to have transitioned to INFO_MINE before proceeding */ | ||||
switch (bp->bp_infois) { | switch (bp->bp_infois) { | ||||
case BSTP_INFO_DISABLED: | case BSTP_INFO_DISABLED: | ||||
case BSTP_INFO_AGED: | case BSTP_INFO_AGED: | ||||
return; | return; | ||||
} | } | ||||
/* range checks */ | |||||
if (cu->cu_message_age >= cu->cu_max_age) { | |||||
return; | |||||
} | |||||
if (cu->cu_max_age < BSTP_MIN_MAX_AGE || | |||||
cu->cu_max_age > BSTP_MAX_MAX_AGE) { | |||||
donner: Should this be "<=" and ">="? | |||||
Done Inline ActionsNo, BSTP_MIN_MAX_AGE is still acceptable. The cu_max_age value should only be rejected if it's strictly less than that value. (Or more than the maximum value). See also bstp_set_maxage() for example. kp: No, BSTP_MIN_MAX_AGE is still acceptable. The cu_max_age value should only be rejected if it's… | |||||
return; | |||||
} | |||||
if (cu->cu_forward_delay < BSTP_MIN_FORWARD_DELAY || | |||||
cu->cu_forward_delay > BSTP_MAX_FORWARD_DELAY) { | |||||
Done Inline ActionsDito donner: Dito | |||||
return; | |||||
} | |||||
if (cu->cu_hello_time < BSTP_MIN_HELLO_TIME || | |||||
cu->cu_hello_time > BSTP_MAX_HELLO_TIME) { | |||||
Done Inline ActionsDito and may you have a space left? donner: Dito and may you have a space left? | |||||
Done Inline ActionsYes. I checked the couch and found a loose space, so I don't have to run to the store to buy more. kp: Yes. I checked the couch and found a loose space, so I don't have to run to the store to buy… | |||||
Not Done Inline ActionsMay you insert the space into the code like this? cu->cu_hello_time > BSTP_MAX_HELLO_TIME donner: May you insert the space into the code like this?
cu->cu_hello_time > BSTP_MAX_HELLO_TIME | |||||
Done Inline ActionsYes, I've applied that change in my local version of this commit and it'll be included when I push this later today. kp: Yes, I've applied that change in my local version of this commit and it'll be included when I… | |||||
return; | |||||
} | |||||
type = bstp_pdu_rcvtype(bp, cu); | type = bstp_pdu_rcvtype(bp, cu); | ||||
switch (type) { | switch (type) { | ||||
case BSTP_PDU_SUPERIOR: | case BSTP_PDU_SUPERIOR: | ||||
bs->bs_allsynced = 0; | bs->bs_allsynced = 0; | ||||
bp->bp_agreed = 0; | bp->bp_agreed = 0; | ||||
bp->bp_proposing = 0; | bp->bp_proposing = 0; | ||||
▲ Show 20 Lines • Show All 1,682 Lines • Show Last 20 Lines |
Should this be "<=" and ">="?