Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
net-tools
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
Kirill Smelkov
net-tools
Commits
87661e43
Commit
87661e43
authored
May 12, 1998
by
Klaas Freitag
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Only set netmask in rtrequest if there was really a netmask specified.
parent
86cdbae6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
lib/inet_sr.c
lib/inet_sr.c
+7
-3
No files found.
lib/inet_sr.c
View file @
87661e43
...
...
@@ -81,9 +81,13 @@ static int INET_setroute(int action, int options, char **args)
struct
sockaddr_in
m
;
struct
sockaddr
d
;
}
mask
;
if
(
inet_aftype
.
getmask
(
target
,
&
mask
.
d
,
netmask
)
<
0
)
int
n
;
n
=
inet_aftype
.
getmask
(
target
,
&
mask
.
d
,
netmask
);
if
(
n
<
0
)
return
usage
();
rt
.
rt_genmask
=
full_mask
(
mask
.
d
);
else
if
(
n
)
rt
.
rt_genmask
=
full_mask
(
mask
.
d
);
}
if
((
isnet
=
inet_aftype
.
input
(
0
,
target
,
&
rt
.
rt_dst
))
<
0
)
{
...
...
@@ -263,7 +267,7 @@ static int INET_setroute(int action, int options, char **args)
__u32
mask
=
~
ntohl
(
mask_in_addr
(
rt
));
if
((
rt
.
rt_flags
&
RTF_HOST
)
&&
mask
!=
0xffffffff
)
{
fprintf
(
stderr
,
NLS_CATGETS
(
catfd
,
routeSet
,
route_netmask1
,
"route: netmask
doesn't make sense with host route
\n
"
)
);
"route: netmask
%.8x doesn't make sense with host route
\n
"
),
mask
);
return
(
E_OPTERR
);
}
if
(
mask
&
(
mask
+
1
))
{
...
...
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