From 76543d14aec6ce5cb3fc7be9b39c50fcebd2043b Mon Sep 17 00:00:00 2001 From: Sven Eckelmann Date: Sun, 20 Nov 2011 15:47:38 +0100 Subject: batman-adv: Explicitly mark the common header structure All batman-adv packets have a common 3 byte header. It can be used to share some code between different code paths, but it was never explicit stated that this header has to be always the same for all packets. Therefore, new code changes always have the problem that they may accidently introduce regressions by moving some elements around. A new structure is introduced that contains the common header and makes it easier visible that these 3 bytes have to be the same for all on-wire packets. Signed-off-by: Sven Eckelmann Signed-off-by: Marek Lindner --- net/batman-adv/send.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'net/batman-adv/send.c') diff --git a/net/batman-adv/send.c b/net/batman-adv/send.c index 8a684eb738ad..b00a0f537b4e 100644 --- a/net/batman-adv/send.c +++ b/net/batman-adv/send.c @@ -234,7 +234,7 @@ int add_bcast_packet_to_list(struct bat_priv *bat_priv, /* as we have a copy now, it is safe to decrease the TTL */ bcast_packet = (struct bcast_packet *)newskb->data; - bcast_packet->ttl--; + bcast_packet->header.ttl--; skb_reset_mac_header(newskb); -- cgit v1.2.3