Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lxc
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
lxc
Commits
0093bb8c
Commit
0093bb8c
authored
May 18, 2010
by
Daniel Lezcano
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added locally modified files for broadcast support
Signed-off-by:
Daniel Lezcano
<
dlezcano@fr.ibm.com
>
parent
1f1b18e7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
10 deletions
+18
-10
conf.c
src/lxc/conf.c
+5
-4
conf.h
src/lxc/conf.h
+1
-1
confile.c
src/lxc/confile.c
+12
-5
No files found.
src/lxc/conf.c
View file @
0093bb8c
...
...
@@ -943,8 +943,8 @@ static int setup_ipv4_addr(struct lxc_list *ip, int ifindex)
inetdev
=
iterator
->
elem
;
err
=
lxc_ip
_addr_add
(
AF_INET
,
ifindex
,
&
inetdev
->
addr
,
inetdev
->
prefix
);
err
=
lxc_ip
v4_addr_add
(
ifindex
,
&
inetdev
->
addr
,
&
inetdev
->
bcast
,
inetdev
->
prefix
);
if
(
err
)
{
ERROR
(
"failed to setup_ipv4_addr ifindex %d : %s"
,
ifindex
,
strerror
(
-
err
));
...
...
@@ -965,8 +965,9 @@ static int setup_ipv6_addr(struct lxc_list *ip, int ifindex)
inet6dev
=
iterator
->
elem
;
err
=
lxc_ip_addr_add
(
AF_INET6
,
ifindex
,
&
inet6dev
->
addr
,
inet6dev
->
prefix
);
err
=
lxc_ipv6_addr_add
(
ifindex
,
&
inet6dev
->
addr
,
&
inet6dev
->
mcast
,
&
inet6dev
->
acast
,
inet6dev
->
prefix
);
if
(
err
)
{
ERROR
(
"failed to setup_ipv6_addr ifindex %d : %s"
,
ifindex
,
strerror
(
-
err
));
...
...
src/lxc/conf.h
View file @
0093bb8c
...
...
@@ -62,7 +62,7 @@ struct lxc_route {
*/
struct
lxc_inet6dev
{
struct
in6_addr
addr
;
struct
in6_addr
b
cast
;
struct
in6_addr
m
cast
;
struct
in6_addr
acast
;
int
prefix
;
};
...
...
src/lxc/confile.c
View file @
0093bb8c
...
...
@@ -405,16 +405,23 @@ static int config_network_ipv4(const char *key, char *value,
return
-
1
;
}
if
(
bcast
)
if
(
!
inet_pton
(
AF_INET
,
bcast
,
&
inetdev
->
bcast
))
{
SYSERROR
(
"invalid ipv4 address: %s"
,
value
);
return
-
1
;
}
if
(
bcast
&&
!
inet_pton
(
AF_INET
,
bcast
,
&
inetdev
->
bcast
))
{
SYSERROR
(
"invalid ipv4 broadcast address: %s"
,
value
);
return
-
1
;
}
/* no prefix specified, determine it from the network class */
inetdev
->
prefix
=
prefix
?
atoi
(
prefix
)
:
config_ip_prefix
(
&
inetdev
->
addr
);
/* if no broadcast address, let compute one from the
* prefix and address
*/
if
(
!
bcast
)
{
inetdev
->
bcast
.
s_addr
=
htonl
(
INADDR_BROADCAST
<<
(
32
-
inetdev
->
prefix
));
inetdev
->
bcast
.
s_addr
&=
inetdev
->
addr
.
s_addr
;
}
lxc_list_add
(
&
netdev
->
ipv4
,
list
);
...
...
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