A userspace application that filters DHCP floods to protect a DHCP server. It uses the Netfilter userspace packet queuing API.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Makefile 414B

12345678910111213141516171819202122
  1. CC := gcc
  2. CCFLAGS := -Wall -g
  3. LDFLAGS := -lnetfilter_queue
  4. TARGETS:= dhcp_protect
  5. MAINS := $(dhcp_protect .o, $(TARGETS) )
  6. OBJ := dhcp_protect.o $(MAINS)
  7. DEPS := dhcp_protect.h
  8. .PHONY: all clean
  9. all: $(TARGETS)
  10. clean:
  11. rm -f $(TARGETS) $(OBJ)
  12. $(OBJ): %.o : %.c $(DEPS)
  13. $(CC) -c -o $@ $< $(CCFLAGS)
  14. $(TARGETS): % : $(filter-out $(MAINS), $(OBJ)) %.o
  15. $(CC) -o $@ $(LIBS) $^ $(CCFLAGS) $(LDFLAGS)