aboutsummaryrefslogtreecommitdiffstats
path: root/net/802/tr.c
diff options
context:
space:
mode:
authorJochen Friedrich <jochen@scram.de>2005-10-23 04:31:45 -0400
committerArnaldo Carvalho de Melo <acme@mandriva.com>2005-10-25 19:31:38 -0400
commit5ac660ee1334b401450280cd282113b2c18398f5 (patch)
tree0203fee844acab04738907761f15a42f6ee7dd2d /net/802/tr.c
parent4ea6a8046bb49d43c950898f0cb4e1994ef6c89d (diff)
[TR]: Preserve RIF flag even for 2 byte RIF fields.
Signed-off-by: Jochen Friedrich <jochen@scram.de> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Diffstat (limited to 'net/802/tr.c')
-rw-r--r--net/802/tr.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/802/tr.c b/net/802/tr.c
index 1eaa3d19d8bf..afd8385c0c9c 100644
--- a/net/802/tr.c
+++ b/net/802/tr.c
@@ -340,9 +340,10 @@ static void tr_add_rif_info(struct trh_hdr *trh, struct net_device *dev)
340 unsigned int hash, rii_p = 0; 340 unsigned int hash, rii_p = 0;
341 unsigned long flags; 341 unsigned long flags;
342 struct rif_cache *entry; 342 struct rif_cache *entry;
343 343 unsigned char saddr0;
344 344
345 spin_lock_irqsave(&rif_lock, flags); 345 spin_lock_irqsave(&rif_lock, flags);
346 saddr0 = trh->saddr[0];
346 347
347 /* 348 /*
348 * Firstly see if the entry exists 349 * Firstly see if the entry exists
@@ -395,7 +396,6 @@ printk("adding rif_entry: addr:%02X:%02X:%02X:%02X:%02X:%02X rcf:%04X\n",
395 entry->rcf = trh->rcf & htons((unsigned short)~TR_RCF_BROADCAST_MASK); 396 entry->rcf = trh->rcf & htons((unsigned short)~TR_RCF_BROADCAST_MASK);
396 memcpy(&(entry->rseg[0]),&(trh->rseg[0]),8*sizeof(unsigned short)); 397 memcpy(&(entry->rseg[0]),&(trh->rseg[0]),8*sizeof(unsigned short));
397 entry->local_ring = 0; 398 entry->local_ring = 0;
398 trh->saddr[0]|=TR_RII; /* put the routing indicator back for tcpdump */
399 } 399 }
400 else 400 else
401 { 401 {
@@ -422,6 +422,7 @@ printk("updating rif_entry: addr:%02X:%02X:%02X:%02X:%02X:%02X rcf:%04X\n",
422 } 422 }
423 entry->last_used=jiffies; 423 entry->last_used=jiffies;
424 } 424 }
425 trh->saddr[0]=saddr0; /* put the routing indicator back for tcpdump */
425 spin_unlock_irqrestore(&rif_lock, flags); 426 spin_unlock_irqrestore(&rif_lock, flags);
426} 427}
427 428