diff --git a/Makefile b/Makefile index 1f11226..d347768 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ cutter: cutter.c - cc cutter.c -o cutter + cc $(CFLAGS) cutter.c -o cutter $(LDFLAGS) clean: rm -f cutter.o cutter diff --git a/cutter.c b/cutter.c index 1c639c9..0d0466b 100644 --- a/cutter.c +++ b/cutter.c @@ -44,7 +44,6 @@ #include #include #include -#include #include #include #include /* the L2 protocols */ @@ -54,6 +53,7 @@ #include #include #include +#include #define ETHHDR sizeof(struct ethhdr) #define TCPHDR sizeof(struct tcphdr) @@ -129,7 +129,7 @@ int getnexthop(in_addr_t ip, char *intf, in_addr_t *gateway) dest_ip = gateway_ip = flags = refcnt = use = metric = mask = mtu = window = irtt = -1; - if (sscanf(buff, "%s %8lx %8lx %4x %d %d %d %8lx %d %d %d", + if (sscanf(buff, "%s %8x %8x %4x %d %d %d %8x %d %d %d", iface, &dest_ip, &gateway_ip, &flags, &refcnt, &use, &metric, &mask, &mtu, &window, &irtt ) == 11) {