diff options
Diffstat (limited to 'isisd/isis_dlpi.c')
-rw-r--r-- | isisd/isis_dlpi.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/isisd/isis_dlpi.c b/isisd/isis_dlpi.c index db4383be..e61dd166 100644 --- a/isisd/isis_dlpi.c +++ b/isisd/isis_dlpi.c @@ -42,8 +42,6 @@ #include "isisd/isis_circuit.h" #include "isisd/isis_flags.h" #include "isisd/isisd.h" -#include "isisd/isis_constants.h" -#include "isisd/isis_circuit.h" #include "isisd/isis_network.h" #include "privs.h" @@ -452,11 +450,19 @@ open_dlpi_dev (struct isis_circuit *circuit) if (ioctl (fd, I_PUSH, "pfmod") == 0) { struct packetfilt pfil; + struct strioctl sioc; pfil.Pf_Priority = 0; pfil.Pf_FilterLen = sizeof (pf_filter) / sizeof (u_short); memcpy (pfil.Pf_Filter, pf_filter, sizeof (pf_filter)); - ioctl (fd, PFIOCSETF, &pfil); + /* pfmod does not support transparent ioctls */ + sioc.ic_cmd = PFIOCSETF; + sioc.ic_timout = 5; + sioc.ic_len = sizeof (struct packetfilt); + sioc.ic_dp = (char *)&pfil; + if (ioctl (fd, I_STR, &sioc) == -1) + zlog_warn("%s: could not perform PF_IOCSETF on %s", + __func__, circuit->interface->name); } circuit->fd = fd; |