ip/ipconfig: use ewrite() to enable routing command for sendra
This commit is contained in:
parent
5fe49f9c71
commit
7aac23b02b
1 changed files with 1 additions and 6 deletions
|
@ -1124,17 +1124,12 @@ sendra6(void)
|
||||||
static void
|
static void
|
||||||
startra6(void)
|
startra6(void)
|
||||||
{
|
{
|
||||||
static char routeon[] = "iprouting 1";
|
|
||||||
|
|
||||||
if(conf.recvra > 0)
|
if(conf.recvra > 0)
|
||||||
recvra6();
|
recvra6();
|
||||||
|
|
||||||
dolog = 1;
|
dolog = 1;
|
||||||
if(conf.sendra > 0) {
|
if(conf.sendra > 0) {
|
||||||
if(write(conf.cfd, routeon, sizeof routeon - 1) < 0) {
|
ewrite(conf.cfd, "iprouting 1");
|
||||||
warning("write (%s) failed: %r", routeon);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
sendra6();
|
sendra6();
|
||||||
if(conf.recvra <= 0)
|
if(conf.recvra <= 0)
|
||||||
recvra6();
|
recvra6();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue