This patch will allow us to use the datalink when computing the filter.
It also fixes a potential issue where an interface data type change
after the interface if going down/up.
}
#endif
+ ptv->datalink = AFPGetDevLinktype(ptv->socket, ptv->iface);
+ switch (ptv->datalink) {
+ case ARPHRD_PPP:
+ case ARPHRD_ATM:
+ ptv->cooked = 1;
+ }
+
/* Init is ok */
ptv->afp_state = AFP_STATE_UP;
return 0;
SCReturnInt(TM_ECODE_FAILED);
}
- ptv->datalink = AFPGetDevLinktype(ptv->socket, ptv->iface);
- switch (ptv->datalink) {
- case ARPHRD_PPP:
- case ARPHRD_ATM:
- ptv->cooked = 1;
- }
+
#define T_DATA_SIZE 70000
ptv->data = SCMalloc(T_DATA_SIZE);