Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 314308
b: refs/heads/master
c: 16a7034
h: refs/heads/master
v: v3
  • Loading branch information
Al Viro authored and Antonio Quartulli committed Jun 18, 2012
1 parent 92aa63d commit acb295b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f25bd58a9d95481e81a09a3a88c4a3f3ab38609f
refs/heads/master: 16a703459bb58aa873c5b36f42093f0f681628af
10 changes: 2 additions & 8 deletions trunk/net/batman-adv/bat_iv_ogm.c
Original file line number Diff line number Diff line change
Expand Up @@ -547,8 +547,6 @@ static void bat_iv_ogm_forward(struct orig_node *orig_node,
"Forwarding packet: tq: %i, ttl: %i\n",
batman_ogm_packet->tq, batman_ogm_packet->header.ttl);

batman_ogm_packet->tt_crc = htons(batman_ogm_packet->tt_crc);

/* switch of primaries first hop flag when forwarding */
batman_ogm_packet->flags &= ~PRIMARIES_FIRST_HOP;
if (is_single_hop_neigh)
Expand Down Expand Up @@ -724,7 +722,7 @@ static void bat_iv_ogm_orig_update(struct bat_priv *bat_priv,
tt_update_orig(bat_priv, orig_node, tt_buff,
batman_ogm_packet->tt_num_changes,
batman_ogm_packet->ttvn,
batman_ogm_packet->tt_crc);
ntohs(batman_ogm_packet->tt_crc));

if (orig_node->gw_flags != batman_ogm_packet->gw_flags)
gw_node_update(bat_priv, orig_node,
Expand Down Expand Up @@ -972,7 +970,7 @@ static void bat_iv_ogm_process(const struct ethhdr *ethhdr,
ethhdr->h_source, if_incoming->net_dev->name,
if_incoming->net_dev->dev_addr, batman_ogm_packet->orig,
batman_ogm_packet->prev_sender, ntohl(batman_ogm_packet->seqno),
batman_ogm_packet->ttvn, batman_ogm_packet->tt_crc,
batman_ogm_packet->ttvn, ntohs(batman_ogm_packet->tt_crc),
batman_ogm_packet->tt_num_changes, batman_ogm_packet->tq,
batman_ogm_packet->header.ttl,
batman_ogm_packet->header.version, has_directlink_flag);
Expand Down Expand Up @@ -1219,10 +1217,6 @@ static int bat_iv_ogm_receive(struct sk_buff *skb,

/* unpack the aggregated packets and process them one by one */
do {
/* network to host order for our 32bit seqno and the
orig_interval */
batman_ogm_packet->tt_crc = ntohs(batman_ogm_packet->tt_crc);

tt_buff = packet_buff + buff_pos + BATMAN_OGM_HLEN;

bat_iv_ogm_process(ethhdr, batman_ogm_packet,
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/batman-adv/packet.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ struct batman_ogm_packet {
uint8_t tq;
uint8_t tt_num_changes;
uint8_t ttvn; /* translation table version number */
uint16_t tt_crc;
__be16 tt_crc;
} __packed;

#define BATMAN_OGM_HLEN sizeof(struct batman_ogm_packet)
Expand Down

0 comments on commit acb295b

Please sign in to comment.