Modify

Opened 8 years ago

Closed 7 years ago

Last modified 4 years ago

#6458 closed defect (wontfix)

OpenL2TP support is broken for brcm-2.4

Reported by: Roman Yepishev <roman.yepishev@…> Owned by: developers
Priority: normal Milestone: Barrier Breaker 14.07
Component: packages Version: Trunk
Keywords: openl2tp brcm-2.4 Cc:

Description

A patch is required for 2.4 kernels to be able to support OpenL2TP. Currently OpenWRT build system does not fetch it from, say Sourceforge and does not apply required changes.

Additionally, even if 2.4 is applied the following issues arise:

  1. NULL is assigned to skb->nf_bridge in kernel-dir/drivers/net/pppol2tp.c:

Reason:

#ifdef CONFIG_NETFILTER
        /* We need to forget conntrack info as we reuse the same skb. */
        nf_conntrack_put(skb->nfct);
        skb->nfct = NULL;
#ifdef CONFIG_NETFILTER_DEBUG
        skb->nf_debug = 0;
#endif
#if defined(CONFIG_BRIDGE) || defined(CONFIG_BRIDGE_MODULE)
        skb->nf_bridge = NULL;
#endif
#endif /* CONFIG_NETFILTER */

I was not able to find nf_bridge anywhere so I had to comment it. Probably not the best decision but it built and works now.

  1. udp_prot is not exported:
    root@OpenWrt:/lib/modules/2.4.37.5# insmod pppol2tp
    insmod: unresolved symbol udp_prot
    

Reason: udp_prot is exported only when:

#if defined (CONFIG_IPV6_MODULE) 
  || defined (CONFIG_KHTTPD) 
  || defined (CONFIG_KHTTPD_MODULE)
  || defined (CONFIG_IP_SCTP_MODULE)

I solved it by enabling ipv6 as a module in OpenWRT configuration (since I don't need khttpd for sure). The symbol is then exported.

  1. pppd is started with nomp option, but multilink support is disabled in OpenWRT (why?)

openwrt/package/ppp/patches/200-makefile.patch sets HAVE_MULTILINK disabled despite:

# Linux distributions: Please leave multilink ENABLED in your builds

Solved by commenting out the nomp assignment (probably openwrt openl2tp Makefile needs to check HAVE_MULTILINK properly)

  1. Host pppd version is set for OpenWRT Modules:
    : Plugin pppol2tp.so is for pppd version 2.4.5, this is 2.4.4
    

Reason: INCLUDE_DIR is set independently in OpenL2TP makefiles and it points to system include dir by default.

Solved by:

diff --git a/net/openl2tp/Makefile b/net/openl2tp/Makefile
index 71ae06b..a56c3b7 100644
--- a/net/openl2tp/Makefile
+++ b/net/openl2tp/Makefile
@@ -43,7 +43,8 @@ MAKE_FLAGS+= \
        KERNEL_BLDDIR="$(LINUX_DIR)" \
        PPPD_VERSION="$(PKG_PPPD_VERSION)" \
        READLINE_DIR="$(STAGING_DIR)/usr" \
-       PPPD_SRCDIR="$(STAGING_DIR)/usr/include" \
+       PPPD_SRCDIR="$(STAGING_DIR)/usr" \
+       INCLUDE_DIR="$(STAGING_DIR)/usr/include" \
        PPPD_LIBDIR="$(STAGING_DIR)/usr/lib"
 
 define Package/openl2tp/install
  1. OpenL2TP hardcodes SOL_PPPOL2TP as 273 (correct for 2.6) but 2.4 kernel defines it as 269:

pppd debug:

Plugin pppol2tp.so loaded.
Plugin openl2tp.so loaded.
PPPoL2TP kernel driver not installed

Reason: openl2tp-1.6/pppd/pppol2tp.c sets

#ifndef SOL_PPPOL2TP
#define SOL_PPPOL2TP    273
#endif

Solved by changing to 269. This should be fixed by kernel version checks. linux/socket.h defines are not accessible to pppd plugin code.

I guess some of the issues are good candidates for upstream bug reports.

Attachments (0)

Change History (3)

comment:1 Changed 8 years ago by florian

Can you attach patches which do the changes to the right files? That would be easier to apply. Thanks!

comment:2 Changed 7 years ago by nbd

  • Resolution set to wontfix
  • Status changed from new to closed

brcm-2.4 is no longer supported => wontfix

comment:3 Changed 4 years ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.