Bug 21604
| Summary: | Problem with ip_masq.c when compiling kernel | ||
|---|---|---|---|
| Product: | [Retired] Red Hat Linux | Reporter: | umkay |
| Component: | kernel | Assignee: | Arjan van de Ven <arjanv> |
| Status: | CLOSED RAWHIDE | QA Contact: | Brock Organ <borgan> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 7.0 | CC: | maw, mjt, umkay |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | i386 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2001-02-15 17:33:37 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
umkay
2000-12-01 22:10:11 UTC
I was able to successfully compile a kernel that had ip_Masquerading unchecked. This is errata kernel, 2.2.17-14.
In ip_masq.c, there is a reference to ip_masq_hash() and ip_masq_unhash()
routines in EXPORT_SYMBOL() statements that are at a top of this file, but
those routines defined in a middle and not declared anywhere. Both of this
are strange: usually exporting is done at a bottom of a file, and a routine
that are accessed by other modules (in this case, that are
ip_masq_{generic,ipsec,pptp}()) should be declared in some header file...
Aha -- found it.
In ip_masq.c, there is a code:
#ifdef CONFIG_IP_MASQUERADE_MOD
#include <net/ip_masq_mod.h>
#endif
In that header that routines are declared. So, we either should build
with CONFIG_IP_MASQUERADE_MOD (as a workaround), or, better, wrap those
two EXPORT_SYMBOLs using this same #ifdef. Basically this is wat I do
now.
Btw, probably we'll live with this bug for 7.0 lifetime - I'm almost shure
that RedHat will not release new 2.2 kernel for 7.0... :(
Why there is no option for non-reporter to change some other fields? :) (just kidding) This issue isn't i386-specific. Ok, one more info on this. There is already a fix for a patch: linux-2.2.17-ip-masq-vpn-fix.patch that fixes some issues in linux-2.2.16-ip-masq-vpn.patch (this issue was introduced in the latter). This error occurs only when NOT using vpn features. So, for umkay (and for me), solution will be to comment out patches 251 and 252 (the two above ones) in spec file... :) I ran into the same problem: ip_masq.c:578: `ip_masq_hash' undeclared here (not in a function) ip_masq.c:578: initializer element for `__ksymtab_ip_masq_hash.value' is not constant ip_masq.c:579: `ip_masq_unhash' undeclared here (not in a function) ip_masq.c:579: initializer element for `__ksymtab_ip_masq_unhash.value' is not constant make[3]: *** [ip_masq.o] Error 1 Can you attach your .config file that breaks? That makes it simpler to reproduce (and verify it is fixed later) This will happen only if CONFIG_IP_MASQUERADE_MOD is NOT defined.
Trivially... By default, in Redhat's configs, this variable IS
defined. (and ofcouse, for ip_masq to be compiled at all, other
config_MASQ etc should be set to yes). I already proposed a solution
to this (I don't like patches for patches) -- to wrap those two
EXPORT_SYMBOLs with the same #ifdef as #include above (clean way), or
just remove first ifdef (a bit dirty). This is a "bug" in
ip_masq-vpn.patch - in quotes here ("), as obviously if one applied
that patch he wants that functionality (controlled, among others, by
IP_MASQUERADE_MOD option).
A patch for this will be in the next 2.2 kernel-build, if and when one becomes available. |