Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
babeld
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
babeld
Commits
916fc9e5
Commit
916fc9e5
authored
Jun 20, 2014
by
Matthieu Boutier
Committed by
Juliusz Chroboczek
Jun 20, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove tab characters.
parent
0b778cc6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
6 deletions
+6
-6
kernel.c
kernel.c
+1
-1
kernel_socket.c
kernel_socket.c
+4
-4
message.c
message.c
+1
-1
No files found.
kernel.c
View file @
916fc9e5
...
@@ -88,7 +88,7 @@ read_random_bytes(void *buf, size_t len)
...
@@ -88,7 +88,7 @@ read_random_bytes(void *buf, size_t len)
fd
=
open
(
"/dev/urandom"
,
O_RDONLY
);
fd
=
open
(
"/dev/urandom"
,
O_RDONLY
);
if
(
fd
<
0
)
{
if
(
fd
<
0
)
{
rc
=
-
1
;
rc
=
-
1
;
}
else
{
}
else
{
rc
=
read
(
fd
,
buf
,
len
);
rc
=
read
(
fd
,
buf
,
len
);
if
(
rc
<
0
||
(
unsigned
)
rc
<
len
)
if
(
rc
<
0
||
(
unsigned
)
rc
<
len
)
...
...
kernel_socket.c
View file @
916fc9e5
...
@@ -138,7 +138,7 @@ fail:
...
@@ -138,7 +138,7 @@ fail:
}
}
/* KAME said : "Following two macros are highly depending on KAME Release" */
/* KAME said : "Following two macros are highly depending on KAME Release" */
#define
IN6_LINKLOCAL_IFINDEX(a) ((a).s6_addr[2] << 8 | (a).s6_addr[3])
#define
IN6_LINKLOCAL_IFINDEX(a) ((a).s6_addr[2] << 8 | (a).s6_addr[3])
#define SET_IN6_LINKLOCAL_IFINDEX(a, i) \
#define SET_IN6_LINKLOCAL_IFINDEX(a, i) \
do { \
do { \
(a).s6_addr[2] = ((i) >> 8) & 0xff; \
(a).s6_addr[2] = ((i) >> 8) & 0xff; \
...
@@ -171,7 +171,7 @@ mask2len(const unsigned char *p, const int size)
...
@@ -171,7 +171,7 @@ mask2len(const unsigned char *p, const int size)
}
}
if
(
j
<
size
)
{
if
(
j
<
size
)
{
switch
(
*
p
)
{
switch
(
*
p
)
{
#define
MASKLEN(m, l)
case m: do { i += l; break; } while (0)
#define
MASKLEN(m, l)
case m: do { i += l; break; } while (0)
MASKLEN
(
0xfe
,
7
);
break
;
MASKLEN
(
0xfe
,
7
);
break
;
MASKLEN
(
0xfc
,
6
);
break
;
MASKLEN
(
0xfc
,
6
);
break
;
MASKLEN
(
0xf8
,
5
);
break
;
MASKLEN
(
0xf8
,
5
);
break
;
...
@@ -179,7 +179,7 @@ mask2len(const unsigned char *p, const int size)
...
@@ -179,7 +179,7 @@ mask2len(const unsigned char *p, const int size)
MASKLEN
(
0xe0
,
3
);
break
;
MASKLEN
(
0xe0
,
3
);
break
;
MASKLEN
(
0xc0
,
2
);
break
;
MASKLEN
(
0xc0
,
2
);
break
;
MASKLEN
(
0x80
,
1
);
break
;
MASKLEN
(
0x80
,
1
);
break
;
#undef
MASKLEN
#undef
MASKLEN
}
}
}
}
return
i
;
return
i
;
...
@@ -674,7 +674,7 @@ kernel_routes(struct kernel_route *routes, int maxroutes)
...
@@ -674,7 +674,7 @@ kernel_routes(struct kernel_route *routes, int maxroutes)
mib
[
2
]
=
0
;
mib
[
2
]
=
0
;
mib
[
3
]
=
AF_UNSPEC
;
/* Address family */
mib
[
3
]
=
AF_UNSPEC
;
/* Address family */
mib
[
4
]
=
NET_RT_DUMP
;
/* Dump the kernel routing table */
mib
[
4
]
=
NET_RT_DUMP
;
/* Dump the kernel routing table */
mib
[
5
]
=
0
;
/* No flags */
mib
[
5
]
=
0
;
/* No flags */
rc
=
sysctl
(
mib
,
6
,
NULL
,
&
len
,
NULL
,
0
);
rc
=
sysctl
(
mib
,
6
,
NULL
,
&
len
,
NULL
,
0
);
if
(
rc
<
0
)
{
if
(
rc
<
0
)
{
...
...
message.c
View file @
916fc9e5
...
@@ -619,7 +619,7 @@ parse_packet(const unsigned char *from, struct interface *ifp,
...
@@ -619,7 +619,7 @@ parse_packet(const unsigned char *from, struct interface *ifp,
if
(
valid_rtt
(
neigh
))
{
if
(
valid_rtt
(
neigh
))
{
/* Running exponential average. */
/* Running exponential average. */
smoothed_rtt
=
(
ifp
->
rtt_decay
*
rtt
+
smoothed_rtt
=
(
ifp
->
rtt_decay
*
rtt
+
(
256
-
ifp
->
rtt_decay
)
*
neigh
->
rtt
);
(
256
-
ifp
->
rtt_decay
)
*
neigh
->
rtt
);
/* Rounding (up or down) to get closer to the sample. */
/* Rounding (up or down) to get closer to the sample. */
neigh
->
rtt
=
(
neigh
->
rtt
>=
rtt
)
?
smoothed_rtt
/
256
:
neigh
->
rtt
=
(
neigh
->
rtt
>=
rtt
)
?
smoothed_rtt
/
256
:
(
smoothed_rtt
+
255
)
/
256
;
(
smoothed_rtt
+
255
)
/
256
;
...
...
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