diff options
author | Gerrit Renker <gerrit@erg.abdn.ac.uk> | 2006-11-10 13:29:14 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-12-03 00:22:04 -0500 |
commit | d83ca5accb256de1b44835cd222bfdc3207bd7dc (patch) | |
tree | c7be8b1f61d4403fe15bd279ecf9d52619134592 /net/dccp/ipv4.c | |
parent | cf557926f6955b4c3fa55e81fdb3675e752e8eed (diff) |
[DCCP]: Update code comments for Step 2/3
Sorts out the comments for processing steps 2,3 in section 8.5 of RFC 4340.
All comments have been updated against this document, and the reference to step
2 has been made consistent throughout the files.
Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Diffstat (limited to 'net/dccp/ipv4.c')
-rw-r--r-- | net/dccp/ipv4.c | 38 |
1 files changed, 18 insertions, 20 deletions
diff --git a/net/dccp/ipv4.c b/net/dccp/ipv4.c index d75ce8c7e488..91bffaa761a6 100644 --- a/net/dccp/ipv4.c +++ b/net/dccp/ipv4.c | |||
@@ -729,24 +729,23 @@ int dccp_v4_do_rcv(struct sock *sk, struct sk_buff *skb) | |||
729 | 729 | ||
730 | /* | 730 | /* |
731 | * Step 3: Process LISTEN state | 731 | * Step 3: Process LISTEN state |
732 | * If S.state == LISTEN, | 732 | * If P.type == Request or P contains a valid Init Cookie option, |
733 | * If P.type == Request or P contains a valid Init Cookie | 733 | * (* Must scan the packet's options to check for Init |
734 | * option, | 734 | * Cookies. Only Init Cookies are processed here, |
735 | * * Must scan the packet's options to check for an Init | 735 | * however; other options are processed in Step 8. This |
736 | * Cookie. Only the Init Cookie is processed here, | 736 | * scan need only be performed if the endpoint uses Init |
737 | * however; other options are processed in Step 8. This | 737 | * Cookies *) |
738 | * scan need only be performed if the endpoint uses Init | 738 | * (* Generate a new socket and switch to that socket *) |
739 | * Cookies * | 739 | * Set S := new socket for this port pair |
740 | * * Generate a new socket and switch to that socket * | 740 | * S.state = RESPOND |
741 | * Set S := new socket for this port pair | 741 | * Choose S.ISS (initial seqno) or set from Init Cookies |
742 | * S.state = RESPOND | 742 | * Initialize S.GAR := S.ISS |
743 | * Choose S.ISS (initial seqno) or set from Init Cookie | 743 | * Set S.ISR, S.GSR, S.SWL, S.SWH from packet or Init Cookies |
744 | * Set S.ISR, S.GSR, S.SWL, S.SWH from packet or Init Cookie | 744 | * Continue with S.state == RESPOND |
745 | * Continue with S.state == RESPOND | 745 | * (* A Response packet will be generated in Step 11 *) |
746 | * * A Response packet will be generated in Step 11 * | 746 | * Otherwise, |
747 | * Otherwise, | 747 | * Generate Reset(No Connection) unless P.type == Reset |
748 | * Generate Reset(No Connection) unless P.type == Reset | 748 | * Drop packet and return |
749 | * Drop packet and return | ||
750 | * | 749 | * |
751 | * NOTE: the check for the packet types is done in | 750 | * NOTE: the check for the packet types is done in |
752 | * dccp_rcv_state_process | 751 | * dccp_rcv_state_process |
@@ -887,8 +886,6 @@ static int dccp_v4_rcv(struct sk_buff *skb) | |||
887 | /* | 886 | /* |
888 | * Step 2: | 887 | * Step 2: |
889 | * If no socket ... | 888 | * If no socket ... |
890 | * Generate Reset(No Connection) unless P.type == Reset | ||
891 | * Drop packet and return | ||
892 | */ | 889 | */ |
893 | if (sk == NULL) { | 890 | if (sk == NULL) { |
894 | dccp_pr_debug("failed to look up flow ID in table and " | 891 | dccp_pr_debug("failed to look up flow ID in table and " |
@@ -919,6 +916,7 @@ no_dccp_socket: | |||
919 | goto discard_it; | 916 | goto discard_it; |
920 | /* | 917 | /* |
921 | * Step 2: | 918 | * Step 2: |
919 | * If no socket ... | ||
922 | * Generate Reset(No Connection) unless P.type == Reset | 920 | * Generate Reset(No Connection) unless P.type == Reset |
923 | * Drop packet and return | 921 | * Drop packet and return |
924 | */ | 922 | */ |