ip/ipconfig: use ewrite() to enable routing command for sendra

This commit is contained in:
cinap_lenrek 2019-03-17 04:07:30 +01:00
parent 5fe49f9c71
commit 7aac23b02b

View file

@ -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();