Commit b0d045ca authored by Gerrit Renker's avatar Gerrit Renker Committed by David S. Miller

[DCCP]: Parameter renaming

The parameter `seq' of dccp_send_sync() is in fact an acknowledgement number
and not a sequence number - thus renamed by this patch into `ackno'.

Secondly, a `critical' warning is added when a Sync/SyncAck could not be sent.

Sanity: I have checked all other functions that are called in dccp_transmit_skb,
        there are no clashes with the use of dccpd_ack_seq; no other function is
        using this slot at the same time.
Signed-off-by: default avatarGerrit Renker <gerrit@erg.abdn.ac.uk>
Signed-off-by: default avatarIan McDonald <ian.mcdonald@jandi.co.nz>
Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@ghostprotocols.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e155d769
...@@ -69,7 +69,7 @@ static int dccp_transmit_skb(struct sock *sk, struct sk_buff *skb) ...@@ -69,7 +69,7 @@ static int dccp_transmit_skb(struct sock *sk, struct sk_buff *skb)
case DCCP_PKT_SYNC: case DCCP_PKT_SYNC:
case DCCP_PKT_SYNCACK: case DCCP_PKT_SYNCACK:
ackno = dcb->dccpd_seq; ackno = dcb->dccpd_ack_seq;
/* fall through */ /* fall through */
default: default:
/* /*
...@@ -507,7 +507,7 @@ void dccp_send_delayed_ack(struct sock *sk) ...@@ -507,7 +507,7 @@ void dccp_send_delayed_ack(struct sock *sk)
sk_reset_timer(sk, &icsk->icsk_delack_timer, timeout); sk_reset_timer(sk, &icsk->icsk_delack_timer, timeout);
} }
void dccp_send_sync(struct sock *sk, const u64 seq, void dccp_send_sync(struct sock *sk, const u64 ackno,
const enum dccp_pkt_type pkt_type) const enum dccp_pkt_type pkt_type)
{ {
/* /*
...@@ -517,14 +517,16 @@ void dccp_send_sync(struct sock *sk, const u64 seq, ...@@ -517,14 +517,16 @@ void dccp_send_sync(struct sock *sk, const u64 seq,
*/ */
struct sk_buff *skb = alloc_skb(sk->sk_prot->max_header, GFP_ATOMIC); struct sk_buff *skb = alloc_skb(sk->sk_prot->max_header, GFP_ATOMIC);
if (skb == NULL) if (skb == NULL) {
/* FIXME: how to make sure the sync is sent? */ /* FIXME: how to make sure the sync is sent? */
DCCP_CRIT("could not send %s", dccp_packet_name(pkt_type));
return; return;
}
/* Reserve space for headers and prepare control bits. */ /* Reserve space for headers and prepare control bits. */
skb_reserve(skb, sk->sk_prot->max_header); skb_reserve(skb, sk->sk_prot->max_header);
DCCP_SKB_CB(skb)->dccpd_type = pkt_type; DCCP_SKB_CB(skb)->dccpd_type = pkt_type;
DCCP_SKB_CB(skb)->dccpd_seq = seq; DCCP_SKB_CB(skb)->dccpd_ack_seq = ackno;
dccp_transmit_skb(sk, skb); dccp_transmit_skb(sk, skb);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment