diff options
Diffstat (limited to 'net/batman-adv/unicast.c')
| -rw-r--r-- | net/batman-adv/unicast.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/net/batman-adv/unicast.c b/net/batman-adv/unicast.c index 07d1c1da89dd..676f6a626b2c 100644 --- a/net/batman-adv/unicast.c +++ b/net/batman-adv/unicast.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (C) 2010-2011 B.A.T.M.A.N. contributors: | 2 | * Copyright (C) 2010-2012 B.A.T.M.A.N. contributors: |
| 3 | * | 3 | * |
| 4 | * Andreas Langer | 4 | * Andreas Langer |
| 5 | * | 5 | * |
| @@ -66,8 +66,8 @@ static struct sk_buff *frag_merge_packet(struct list_head *head, | |||
| 66 | kfree_skb(tmp_skb); | 66 | kfree_skb(tmp_skb); |
| 67 | 67 | ||
| 68 | memmove(skb->data + uni_diff, skb->data, hdr_len); | 68 | memmove(skb->data + uni_diff, skb->data, hdr_len); |
| 69 | unicast_packet = (struct unicast_packet *) skb_pull(skb, uni_diff); | 69 | unicast_packet = (struct unicast_packet *)skb_pull(skb, uni_diff); |
| 70 | unicast_packet->packet_type = BAT_UNICAST; | 70 | unicast_packet->header.packet_type = BAT_UNICAST; |
| 71 | 71 | ||
| 72 | return skb; | 72 | return skb; |
| 73 | 73 | ||
| @@ -238,7 +238,7 @@ int frag_send_skb(struct sk_buff *skb, struct bat_priv *bat_priv, | |||
| 238 | goto dropped; | 238 | goto dropped; |
| 239 | skb_reserve(frag_skb, ucf_hdr_len); | 239 | skb_reserve(frag_skb, ucf_hdr_len); |
| 240 | 240 | ||
| 241 | unicast_packet = (struct unicast_packet *) skb->data; | 241 | unicast_packet = (struct unicast_packet *)skb->data; |
| 242 | memcpy(&tmp_uc, unicast_packet, uc_hdr_len); | 242 | memcpy(&tmp_uc, unicast_packet, uc_hdr_len); |
| 243 | skb_split(skb, frag_skb, data_len / 2 + uc_hdr_len); | 243 | skb_split(skb, frag_skb, data_len / 2 + uc_hdr_len); |
| 244 | 244 | ||
| @@ -251,9 +251,9 @@ int frag_send_skb(struct sk_buff *skb, struct bat_priv *bat_priv, | |||
| 251 | 251 | ||
| 252 | memcpy(frag1, &tmp_uc, sizeof(tmp_uc)); | 252 | memcpy(frag1, &tmp_uc, sizeof(tmp_uc)); |
| 253 | 253 | ||
| 254 | frag1->ttl--; | 254 | frag1->header.ttl--; |
| 255 | frag1->version = COMPAT_VERSION; | 255 | frag1->header.version = COMPAT_VERSION; |
| 256 | frag1->packet_type = BAT_UNICAST_FRAG; | 256 | frag1->header.packet_type = BAT_UNICAST_FRAG; |
| 257 | 257 | ||
| 258 | memcpy(frag1->orig, primary_if->net_dev->dev_addr, ETH_ALEN); | 258 | memcpy(frag1->orig, primary_if->net_dev->dev_addr, ETH_ALEN); |
| 259 | memcpy(frag2, frag1, sizeof(*frag2)); | 259 | memcpy(frag2, frag1, sizeof(*frag2)); |
| @@ -320,11 +320,11 @@ find_router: | |||
| 320 | 320 | ||
| 321 | unicast_packet = (struct unicast_packet *)skb->data; | 321 | unicast_packet = (struct unicast_packet *)skb->data; |
| 322 | 322 | ||
| 323 | unicast_packet->version = COMPAT_VERSION; | 323 | unicast_packet->header.version = COMPAT_VERSION; |
| 324 | /* batman packet type: unicast */ | 324 | /* batman packet type: unicast */ |
| 325 | unicast_packet->packet_type = BAT_UNICAST; | 325 | unicast_packet->header.packet_type = BAT_UNICAST; |
| 326 | /* set unicast ttl */ | 326 | /* set unicast ttl */ |
| 327 | unicast_packet->ttl = TTL; | 327 | unicast_packet->header.ttl = TTL; |
| 328 | /* copy the destination for faster routing */ | 328 | /* copy the destination for faster routing */ |
| 329 | memcpy(unicast_packet->dest, orig_node->orig, ETH_ALEN); | 329 | memcpy(unicast_packet->dest, orig_node->orig, ETH_ALEN); |
| 330 | /* set the destination tt version number */ | 330 | /* set the destination tt version number */ |
| @@ -335,7 +335,7 @@ find_router: | |||
| 335 | data_len + sizeof(*unicast_packet) > | 335 | data_len + sizeof(*unicast_packet) > |
| 336 | neigh_node->if_incoming->net_dev->mtu) { | 336 | neigh_node->if_incoming->net_dev->mtu) { |
| 337 | /* send frag skb decreases ttl */ | 337 | /* send frag skb decreases ttl */ |
| 338 | unicast_packet->ttl++; | 338 | unicast_packet->header.ttl++; |
| 339 | ret = frag_send_skb(skb, bat_priv, | 339 | ret = frag_send_skb(skb, bat_priv, |
| 340 | neigh_node->if_incoming, neigh_node->addr); | 340 | neigh_node->if_incoming, neigh_node->addr); |
| 341 | goto out; | 341 | goto out; |
