git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git]
/
net
/
decnet
/
dn_fib.c
diff --git
a/net/decnet/dn_fib.c
b/net/decnet/dn_fib.c
index
fa20e2e
..
99bc061
100644
(file)
--- a/
net/decnet/dn_fib.c
+++ b/
net/decnet/dn_fib.c
@@
-17,6
+17,7
@@
* this code was copied from it.
*
*/
* this code was copied from it.
*
*/
+#include <linux/config.h>
#include <linux/string.h>
#include <linux/net.h>
#include <linux/socket.h>
#include <linux/string.h>
#include <linux/net.h>
#include <linux/socket.h>
@@
-142,11
+143,11
@@
static inline struct dn_fib_info *dn_fib_find_info(const struct dn_fib_info *nfi
return NULL;
}
return NULL;
}
-
__le
16 dn_fib_get_attr16(struct rtattr *attr, int attrlen, int type)
+
u
16 dn_fib_get_attr16(struct rtattr *attr, int attrlen, int type)
{
while(RTA_OK(attr,attrlen)) {
if (attr->rta_type == type)
{
while(RTA_OK(attr,attrlen)) {
if (attr->rta_type == type)
- return *(
__le
16*)RTA_DATA(attr);
+ return *(
u
16*)RTA_DATA(attr);
attr = RTA_NEXT(attr, attrlen);
}
attr = RTA_NEXT(attr, attrlen);
}
@@
-283,10
+284,11
@@
struct dn_fib_info *dn_fib_create_info(const struct rtmsg *r, struct dn_kern_rta
goto err_inval;
}
goto err_inval;
}
- fi = k
z
alloc(sizeof(*fi)+nhs*sizeof(struct dn_fib_nh), GFP_KERNEL);
+ fi = k
m
alloc(sizeof(*fi)+nhs*sizeof(struct dn_fib_nh), GFP_KERNEL);
err = -ENOBUFS;
if (fi == NULL)
goto failure;
err = -ENOBUFS;
if (fi == NULL)
goto failure;
+ memset(fi, 0, sizeof(*fi)+nhs*sizeof(struct dn_fib_nh));
fi->fib_protocol = r->rtm_protocol;
fi->fib_nhs = nhs;
fi->fib_protocol = r->rtm_protocol;
fi->fib_nhs = nhs;
@@
-563,7
+565,7
@@
int dn_fib_dump(struct sk_buff *skb, struct netlink_callback *cb)
return skb->len;
}
return skb->len;
}
-static void fib_magic(int cmd, int type, __
le
16 dst, int dst_len, struct dn_ifaddr *ifa)
+static void fib_magic(int cmd, int type, __
u
16 dst, int dst_len, struct dn_ifaddr *ifa)
{
struct dn_fib_table *tb;
struct {
{
struct dn_fib_table *tb;
struct {
@@
-682,7
+684,7
@@
static int dn_fib_dnaddr_event(struct notifier_block *this, unsigned long event,
return NOTIFY_DONE;
}
return NOTIFY_DONE;
}
-int dn_fib_sync_down(
__le16
local, struct net_device *dev, int force)
+int dn_fib_sync_down(
dn_address
local, struct net_device *dev, int force)
{
int ret = 0;
int scope = RT_SCOPE_NOWHERE;
{
int ret = 0;
int scope = RT_SCOPE_NOWHERE;