[prev in list] [next in list] [prev in thread] [next in thread]
List: linux-vlan
Subject: [VLAN] macvlan compile problem
From: "Kashyap Ashwin" <Ashwin.Kashyap () thomson ! net>
Date: 2003-12-10 22:16:22
[Download RAW message or body]
--===============19563840920200759==
content-class: urn:content-classes:message
Content-Type: multipart/alternative;
boundary="----_=_NextPart_001_01C3BF6B.3E5BBC48"
This is a multi-part message in MIME format.
Hi,
I am using redhat 7.2 with gcc 2.96 and gcc gets confused some variable \
initialization. This patch fixes it. Please apply.
--- macvlan.c.orig Wed Dec 10 18:09:17 2003
+++ macvlan.c Wed Dec 10 17:28:25 2003
@@ -833,7 +833,8 @@
* take the bottom source address byte
*/
struct macvlan_hash_entry *entry;
- unsigned int bucket = VLAN_BUCKET(src);
+ unsigned int bucket;
+ bucket = VLAN_BUCKET(src);
for (entry = port->hash_table[bucket]; entry; entry = entry->next) {
if (memcmp(entry->mac, src, ETH_ALEN) == 0) {
/*DEBUG("macvlan: matched %02x:%02x:%02x:%02x:%02x:%02x to \
vlan %p\n", @@ -850,10 +851,11 @@
struct macvlan_port *port;
struct macvlan_vlan *vlan;
- unsigned int bucket = VLAN_BUCKET(macaddr);
+ unsigned int bucket;
struct macvlan_hash_entry* entry;
+ bucket = VLAN_BUCKET(macaddr);
/* find the port in question */
port = macvlan_find_port_for_mvlan_ifname(ifname);
if (!port) {
@@ -905,10 +907,12 @@
/* cleans up the mac hash entry memory (kfree). */
static int macvlan_hash_rem(const char* vlan_ifname,
const unsigned char* mac) {
- int bucket = VLAN_BUCKET(mac);
+ int bucket;
struct macvlan_port *port;
struct macvlan_hash_entry *entry;
struct macvlan_hash_entry* prev;
+
+ bucket = VLAN_BUCKET(mac);
/* find the port in question */
port = macvlan_find_port_for_mvlan_ifname(vlan_ifname);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \|/ ____ \|/
Ashwin Kashyap @~/ ,. \~@
Intern /_( \__/ )_\
Thomson - Corporate Research \__U_/
(609) 987-7334 Don't Panic!
[Attachment #3 (text/html)]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1276" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=877581222-10122003><FONT face=Arial
size=2>Hi,</FONT></SPAN></DIV>
<DIV><SPAN class=877581222-10122003><FONT face=Arial size=2>I am using redhat
7.2 with gcc 2.96 and gcc gets confused some variable initialization. This patch
fixes it.</FONT></SPAN></DIV>
<DIV><SPAN class=877581222-10122003><FONT face=Arial size=2>Please
apply.</FONT></SPAN></DIV>
<DIV><SPAN class=877581222-10122003><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=877581222-10122003><FONT face=Arial size=2>---
macvlan.c.orig Wed Dec 10 18:09:17 2003<BR>+++
macvlan.c Wed Dec 10 17:28:25 2003<BR>@@ -833,7 +833,8
@@<BR> * take the bottom source
address byte<BR>
*/<BR> struct macvlan_hash_entry
*entry;<BR>- unsigned int bucket =
VLAN_BUCKET(src);<BR>+ unsigned int
bucket;<BR>+ bucket =
VLAN_BUCKET(src);<BR> for (entry =
port->hash_table[bucket]; entry; entry = entry->next)
{<BR> \
if (memcmp(entry->mac, src, ETH_ALEN) == 0)
{<BR> \
/*DEBUG("macvlan: matched %02x:%02x:%02x:%02x:%02x:%02x to vlan %p\n", <BR>@@
-850,10 +851,11 @@<BR> <BR>
struct macvlan_port *port;<BR> struct
macvlan_vlan *vlan;<BR>- unsigned int bucket
= VLAN_BUCKET(macaddr);<BR>+ unsigned int
bucket;<BR> struct macvlan_hash_entry*
entry;<BR> <BR> <BR>+ bucket =
VLAN_BUCKET(macaddr);<BR> /* find the
port in question */<BR> port =
macvlan_find_port_for_mvlan_ifname(ifname);<BR> \
if (!port) {<BR>@@ -905,10 +907,12 @@<BR> /* cleans up the mac hash entry
memory (kfree). */<BR> static int macvlan_hash_rem(const char*
vlan_ifname,<BR> &nbs \
p; \
const unsigned char* mac) {<BR>- int bucket
= VLAN_BUCKET(mac);<BR>+ int
bucket;<BR> struct macvlan_port
*port;<BR> struct macvlan_hash_entry
*entry;<BR> struct macvlan_hash_entry*
prev;<BR>+<BR>+ bucket =
VLAN_BUCKET(mac);<BR> \
<BR> /* find the port in question
*/<BR> port =
macvlan_find_port_for_mvlan_ifname(vlan_ifname);<BR></FONT></SPAN></DIV>
<DIV><SPAN class=877581222-10122003><FONT face=Arial
size=2> </DIV></FONT></SPAN><PRE>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \
\|/ ____ \|/ Ashwin Kashyap @~/ ,. \~@
Intern /_( \__/ )_\
Thomson - Corporate Research \__U_/
(609) 987-7334 Don't Panic!
</PRE>
<DIV> </DIV></BODY></HTML>
_______________________________________________
VLAN mailing list - VLAN@wanfear.com
http://www.WANfear.com/mailman/listinfo/vlan
VLAN Page: http://scry.wanfear.com/~greear/vlan.html
--===============19563840920200759==--
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic