diff options
Diffstat (limited to 'package/pppd')
-rw-r--r-- | package/pppd/Config.in | 6 | ||||
-rw-r--r-- | package/pppd/pppd-2.4.5-ol2tpv3-2.6.35.patch | 24 | ||||
-rw-r--r-- | package/pppd/pppd.mk | 77 |
3 files changed, 84 insertions, 23 deletions
diff --git a/package/pppd/Config.in b/package/pppd/Config.in index daca87613..879b263cf 100644 --- a/package/pppd/Config.in +++ b/package/pppd/Config.in @@ -13,3 +13,9 @@ config BR2_PACKAGE_PPPD_FILTER Packet filtering abilities for pppd. If enabled, the pppd active-filter and pass-filter options are available. + +config BR2_PACKAGE_PPPD_RADIUS + depends on BR2_PACKAGE_PPPD + bool "radius" + help + Install RADIUS support for pppd diff --git a/package/pppd/pppd-2.4.5-ol2tpv3-2.6.35.patch b/package/pppd/pppd-2.4.5-ol2tpv3-2.6.35.patch new file mode 100644 index 000000000..0e71e2409 --- /dev/null +++ b/package/pppd/pppd-2.4.5-ol2tpv3-2.6.35.patch @@ -0,0 +1,24 @@ +--- ppp-2.4.5/include/linux/if_pppol2tp.h 2009-11-16 22:26:07.000000000 +0000 ++++ ppp-2.4.5/include/linux/if_pppol2tp.h 2010-07-16 22:35:22.000000000 +0100 +@@ -32,6 +32,20 @@ + __u16 d_tunnel, d_session; /* For sending outgoing packets */ + }; + ++/* The L2TPv3 protocol changes tunnel and session ids from 16 to 32 ++ * bits. So we need a different sockaddr structure. ++ */ ++struct pppol2tpv3_addr { ++ pid_t pid; /* pid that owns the fd. ++ * 0 => current */ ++ int fd; /* FD of UDP or IP socket to use */ ++ ++ struct sockaddr_in addr; /* IP address and port to send to */ ++ ++ __u32 s_tunnel, s_session; /* For matching incoming packets */ ++ __u32 d_tunnel, d_session; /* For sending outgoing packets */ ++}; ++ + /* Socket options: + * DEBUG - bitmask of debug message categories + * SENDSEQ - 0 => don't send packets with sequence numbers + diff --git a/package/pppd/pppd.mk b/package/pppd/pppd.mk index 35fd451d7..05c1c32c9 100644 --- a/package/pppd/pppd.mk +++ b/package/pppd/pppd.mk @@ -9,7 +9,10 @@ PPPD_SOURCE = ppp-$(PPPD_VERSION).tar.gz PPPD_SITE = ftp://ftp.samba.org/pub/ppp PPPD_TARGET_BINS = chat pppd pppdump pppstats PPPD_MANPAGES = $(if $(BR2_HAVE_DOCUMENTATION),chat pppd pppdump pppstats) -PPPD_MAKE = $(MAKE) CC="$(TARGET_CC)" COPTS="$(TARGET_CFLAGS)" -C $(PPPD_DIR) $(PPPD_MAKE_OPT) +PPPD_RADIUS_MANPAGES = $(if $(BR2_HAVE_DOCUMENTATION),pppd-radattr pppd-radius) +PPPD_RADIUS_CONF = dictionary dictionary.ascend dictionary.compat \ + dictionary.merit dictionary.microsoft \ + issue port-id-map realms server radiusclient.conf ifeq ($(BR2_PACKAGE_PPPD_FILTER),y) PPPD_DEPENDENCIES += libpcap @@ -20,15 +23,56 @@ ifeq ($(BR2_INET_IPV6),y) PPPD_MAKE_OPT += HAVE_INET6=y endif -$(eval $(call AUTOTARGETS,package,pppd)) - -$(PPPD_HOOK_POST_EXTRACT): +define PPPD_CONFIGURE_CMDS $(SED) 's/FILTER=y/#FILTER=y/' $(PPPD_DIR)/pppd/Makefile.linux $(SED) 's/ifneq ($$(wildcard \/usr\/include\/pcap-bpf.h),)/ifdef FILTER/' $(PPPD_DIR)/*/Makefile.linux - touch $@ + ( cd $(@D); ./configure ) +endef + +define PPPD_BUILD_CMDS + $(MAKE) CC="$(TARGET_CC)" COPTS="$(TARGET_CFLAGS)" \ + -C $(@D) $(PPPD_MAKE_OPT) +endef + +define PPPD_UNINSTALL_TARGET_CMDS + rm -f $(addprefix $(TARGET_DIR)/usr/sbin/, $(PPPD_TARGET_BINS)) + rm -f $(TARGET_DIR)/usr/sbin/pppoe-discovery + rm -rf $(TARGET_DIR)/usr/lib/pppd + rm -rf $(TARGET_DIR)/etc/ppp/radius + for m in $(PPPD_MANPAGES); do \ + rm -f $(TARGET_DIR)/usr/share/man/man8/$$m.8; \ + done + for m in $(PPPD_RADIUS_MANPAGES); do \ + rm -f $(TARGET_DIR)/usr/share/man/man8/$$m.8; \ + done +endef + +ifeq ($(BR2_PACKAGE_PPPD_RADIUS),y) +define PPPD_INSTALL_RADIUS + $(INSTALL) -D $(PPPD_DIR)/pppd/plugins/radius/radattr.so \ + $(TARGET_DIR)/usr/lib/pppd/$(PPPD_VERSION)/radattr.so + $(INSTALL) -D $(PPPD_DIR)/pppd/plugins/radius/radius.so \ + $(TARGET_DIR)/usr/lib/pppd/$(PPPD_VERSION)/radius.so + $(INSTALL) -D $(PPPD_DIR)/pppd/plugins/radius/radrealms.so \ + $(TARGET_DIR)/usr/lib/pppd/$(PPPD_VERSION)/radrealms.so + for m in $(PPPD_RADIUS_CONF); do \ + $(INSTALL) -m 644 -D $(PPPD_DIR)/pppd/plugins/radius/etc/$$m \ + $(TARGET_DIR)/etc/ppp/radius/$$m; \ + done + $(SED) 's:/usr/local/etc:/etc:' \ + $(TARGET_DIR)/etc/ppp/radius/radiusclient.conf + $(SED) 's:/usr/local/sbin:/usr/sbin:' \ + $(TARGET_DIR)/etc/ppp/radius/radiusclient.conf + $(SED) 's:/etc/radiusclient:/etc/ppp/radius:g' \ + $(TARGET_DIR)/etc/ppp/radius/* + for m in $(PPPD_RADIUS_MANPAGES); do \ + $(INSTALL) -m 644 -D $(PPPD_DIR)/pppd/plugins/radius/$$m.8 \ + $(TARGET_DIR)/usr/share/man/man8/$$m.8; \ + done +endef +endif -$(PPPD_TARGET_INSTALL_TARGET): - $(call MESSAGE,"Installing to target") +define PPPD_INSTALL_TARGET_CMDS for sbin in $(PPPD_TARGET_BINS); do \ $(INSTALL) -D $(PPPD_DIR)/$$sbin/$$sbin \ $(TARGET_DIR)/usr/sbin/$$sbin; \ @@ -51,24 +95,11 @@ $(PPPD_TARGET_INSTALL_TARGET): $(TARGET_DIR)/usr/lib/pppd/$(PPPD_VERSION)/openl2tp.so $(INSTALL) -D $(PPPD_DIR)/pppd/plugins/pppol2tp/pppol2tp.so \ $(TARGET_DIR)/usr/lib/pppd/$(PPPD_VERSION)/pppol2tp.so - $(INSTALL) -D $(PPPD_DIR)/pppd/plugins/radius/radattr.so \ - $(TARGET_DIR)/usr/lib/pppd/$(PPPD_VERSION)/radattr.so - $(INSTALL) -D $(PPPD_DIR)/pppd/plugins/radius/radius.so \ - $(TARGET_DIR)/usr/lib/pppd/$(PPPD_VERSION)/radius.so - $(INSTALL) -D $(PPPD_DIR)/pppd/plugins/radius/radrealms.so \ - $(TARGET_DIR)/usr/lib/pppd/$(PPPD_VERSION)/radrealms.so + $(PPPD_INSTALL_RADIUS) for m in $(PPPD_MANPAGES); do \ $(INSTALL) -m 644 -D $(PPPD_DIR)/$$m/$$m.8 \ $(TARGET_DIR)/usr/share/man/man8/$$m.8; \ done - touch $@ +endef -$(PPPD_TARGET_UNINSTALL): - $(call MESSAGE,"Uninstalling") - rm -f $(addprefix $(TARGET_DIR)/usr/sbin/, $(PPPD_TARGET_BINS)) - rm -f $(TARGET_DIR)/usr/sbin/pppoe-discovery - for m in $(PPPD_MANPAGES); do \ - rm -f $(TARGET_DIR)/usr/share/man/man8/$$m.8; \ - done - rm -rf $(TARGET_DIR)/usr/lib/pppd - rm -f $(PPPD_TARGET_INSTALL_TARGET) $(PPPD_HOOK_POST_INSTALL) +$(eval $(call GENTARGETS,package,pppd)) |