Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
145c04ec
Commit
145c04ec
authored
Oct 24, 2002
by
Alexey Kuznetsov
Committed by
Hideaki Yoshifuji
Oct 24, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[NET]: Fix rtnetlink metric type, should be u32.
parent
3f5f6d15
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
5 deletions
+25
-5
include/linux/rtnetlink.h
include/linux/rtnetlink.h
+23
-3
net/core/rtnetlink.c
net/core/rtnetlink.c
+2
-2
No files found.
include/linux/rtnetlink.h
View file @
145c04ec
...
...
@@ -198,10 +198,11 @@ enum rtattr_type_t
RTA_MULTIPATH
,
RTA_PROTOINFO
,
RTA_FLOW
,
RTA_CACHEINFO
RTA_CACHEINFO
,
RTA_SESSION
,
};
#define RTA_MAX RTA_
CACHEINFO
#define RTA_MAX RTA_
SESSION
#define RTM_RTA(r) ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct rtmsg))))
#define RTM_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct rtmsg))
...
...
@@ -284,6 +285,25 @@ enum
#define RTAX_MAX RTAX_REORDERING
struct
rta_session
{
__u8
proto
;
union
{
struct
{
__u16
sport
;
__u16
dport
;
}
ports
;
struct
{
__u8
type
;
__u8
code
;
__u16
ident
;
}
icmpt
;
__u32
spi
;
}
u
;
};
/*********************************************************
...
...
@@ -559,7 +579,7 @@ struct rtnetlink_link
extern
struct
rtnetlink_link
*
rtnetlink_links
[
NPROTO
];
extern
int
rtnetlink_dump_ifinfo
(
struct
sk_buff
*
skb
,
struct
netlink_callback
*
cb
);
extern
int
rtnetlink_send
(
struct
sk_buff
*
skb
,
u32
pid
,
u32
group
,
int
echo
);
extern
int
rtnetlink_put_metrics
(
struct
sk_buff
*
skb
,
u
nsigned
*
metrics
);
extern
int
rtnetlink_put_metrics
(
struct
sk_buff
*
skb
,
u
32
*
metrics
);
extern
void
__rta_fill
(
struct
sk_buff
*
skb
,
int
attrtype
,
int
attrlen
,
const
void
*
data
);
...
...
net/core/rtnetlink.c
View file @
145c04ec
...
...
@@ -128,7 +128,7 @@ int rtnetlink_send(struct sk_buff *skb, u32 pid, unsigned group, int echo)
return
err
;
}
int
rtnetlink_put_metrics
(
struct
sk_buff
*
skb
,
u
nsigned
*
metrics
)
int
rtnetlink_put_metrics
(
struct
sk_buff
*
skb
,
u
32
*
metrics
)
{
struct
rtattr
*
mx
=
(
struct
rtattr
*
)
skb
->
tail
;
int
i
;
...
...
@@ -136,7 +136,7 @@ int rtnetlink_put_metrics(struct sk_buff *skb, unsigned *metrics)
RTA_PUT
(
skb
,
RTA_METRICS
,
0
,
NULL
);
for
(
i
=
0
;
i
<
RTAX_MAX
;
i
++
)
{
if
(
metrics
[
i
])
RTA_PUT
(
skb
,
i
+
1
,
sizeof
(
u
nsigned
),
metrics
+
i
);
RTA_PUT
(
skb
,
i
+
1
,
sizeof
(
u
32
),
metrics
+
i
);
}
mx
->
rta_len
=
skb
->
tail
-
(
u8
*
)
mx
;
if
(
mx
->
rta_len
==
RTA_LENGTH
(
0
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment