Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sroamd
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
sroamd
Commits
c45f80a2
Commit
c45f80a2
authored
Aug 03, 2019
by
Juliusz Chroboczek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove option -a.
parent
ab6bebf6
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
23 deletions
+9
-23
README
README
+2
-2
dhcpv4.c
dhcpv4.c
+3
-5
dhcpv4.h
dhcpv4.h
+1
-1
sroamd.c
sroamd.c
+3
-10
sroamd.man
sroamd.man
+0
-5
No files found.
README
View file @
c45f80a2
...
...
@@ -26,6 +26,7 @@ Run hostapd on the wlan0 interface. Your `/etc/hostapd/hostapd.conf`
should say something like
interface=wlan0
channel=11
ssid=sroam
wpa=2
wpa_passphrase=topsecret
...
...
@@ -58,14 +59,13 @@ You need to specify:
* the nameserver(s) announced over DHCPv4 and RA (`-N`);
* the local UDP port used by the flooding algorithm (`-f`);
* the address and port of two or three remote peers (`-F`) (optional);
* the local address of the DHCPv4 server (`-a`) (optional);
* the set of interfaces used for roaming.
In our example, you could say:
sroamd -P 2001:db8:4444::/48 -P 192.168.44.0/24 \
-f 4444 -F [2001:db8:4444::1234]:4444 \
-N 2001:db8:1234::42 -N 10.0.0.42
-a 192.168.44.1
\
-N 2001:db8:1234::42 -N 10.0.0.42 \
wlan0
The flooding algorithm relies on normal unicast traffic, so the sroamd
...
...
dhcpv4.c
View file @
c45f80a2
...
...
@@ -33,7 +33,7 @@ unsigned char dnsv4[16][4];
int
numdnsv4
=
0
;
static
int
setup_dhcpv4_socket
(
const
unsigned
char
*
addr
)
setup_dhcpv4_socket
()
{
int
s
,
rc
,
one
=
1
;
struct
sockaddr_in
sin
;
...
...
@@ -73,8 +73,6 @@ setup_dhcpv4_socket(const unsigned char *addr)
memset
(
&
sin
,
0
,
sizeof
(
sin
));
sin
.
sin_family
=
AF_INET
;
if
(
addr
!=
NULL
)
memcpy
(
&
sin
.
sin_addr
,
addr
,
4
);
sin
.
sin_port
=
htons
(
67
);
rc
=
bind
(
s
,
(
struct
sockaddr
*
)
&
sin
,
sizeof
(
sin
));
...
...
@@ -89,9 +87,9 @@ fail:
}
int
dhcpv4_setup
(
const
unsigned
char
*
addr
)
dhcpv4_setup
()
{
return
setup_dhcpv4_socket
(
addr
);
return
setup_dhcpv4_socket
();
}
void
...
...
dhcpv4.h
View file @
c45f80a2
...
...
@@ -25,7 +25,7 @@ extern int numdnsv4;
extern
int
dhcpv4_socket
;
int
dhcpv4_setup
(
const
unsigned
char
*
addr
);
int
dhcpv4_setup
(
void
);
int
dhcpv4_receive
(
void
);
void
dhcpv4_cleanup
(
void
);
...
...
sroamd.c
View file @
c45f80a2
...
...
@@ -198,11 +198,9 @@ int
main
(
int
argc
,
char
**
argv
)
{
int
rc
,
opt
;
unsigned
char
addr4
[
4
]
=
{
0
,
0
,
0
,
0
};
const
unsigned
char
zeroes
[
4
]
=
{
0
,
0
,
0
,
0
};
while
(
1
)
{
opt
=
getopt
(
argc
,
argv
,
"f:
a:
P:d:N:F:"
);
opt
=
getopt
(
argc
,
argv
,
"f:P:d:N:F:"
);
if
(
opt
<
0
)
break
;
...
...
@@ -216,11 +214,6 @@ main(int argc, char **argv)
flood_port
=
p
;
}
break
;
case
'a'
:
rc
=
inet_pton
(
AF_INET
,
optarg
,
&
addr4
);
if
(
rc
<
1
)
goto
usage
;
break
;
case
'P'
:
{
unsigned
char
buf
[
16
];
int
plen
,
af
;
...
...
@@ -338,7 +331,7 @@ main(int argc, char **argv)
exit
(
1
);
}
rc
=
dhcpv4_setup
(
memcmp
(
addr4
,
zeroes
,
4
)
==
0
?
NULL
:
addr4
);
rc
=
dhcpv4_setup
();
if
(
rc
<
0
)
{
perror
(
"dhcpv4_setup"
);
exit
(
1
);
...
...
@@ -525,7 +518,7 @@ main(int argc, char **argv)
usage:
fprintf
(
stderr
,
"Usage: sroamd [-d level] [-P prefix]... [-N nameserver]...
[-a address]
\n
"
"Usage: sroamd [-d level] [-P prefix]... [-N nameserver]...
\n
"
" [-f port] [-F addr:port]... [interface]...
\n
"
);
exit
(
1
);
}
sroamd.man
View file @
c45f80a2
...
...
@@ -37,11 +37,6 @@ Configure the nameserver address that will be announced to clients over
DHCPv4 or IPv6 RA. This option may be specified multiple times, in which
case all prefixes will be announced to clients.
.TP
.BI \-a " address"
Bind the DHCPv4 server to the given address. This is optional, and if
used must be set to the IPv4 address assigned to the interface or
interfaces that support roaming.
.TP
.BI \-f " port"
Set the local UDP port used by the flooding protocol. If this is not set,
flooding is disabled.
...
...
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