From f26dd9e7528fabb6495f3ae3ee2f3ba0dc38de01 Mon Sep 17 00:00:00 2001 From: Sapan Bhatia Date: Fri, 17 Apr 2009 02:20:42 +0000 Subject: [PATCH] Patch to comment out a check that's breaking Trellis, till we can work out a more complete solution. --- kernel-2.6.spec | 11 +++-------- linux-2.6-710-netns-unsharing-kludge.patch | 21 +++++++++++++++++++++ 2 files changed, 24 insertions(+), 8 deletions(-) create mode 100644 linux-2.6-710-netns-unsharing-kludge.patch diff --git a/kernel-2.6.spec b/kernel-2.6.spec index 66544b011..c0d0a32b0 100644 --- a/kernel-2.6.spec +++ b/kernel-2.6.spec @@ -40,7 +40,7 @@ Summary: The Linux kernel (the core of the Linux operating system) # updated every time the PL kernel is updated. %define vini_pl_patch 561 -%define release vs%{vsversion}.%{taglevel}%{?pldistro:.%{pldistro}}%{?date:.%{date}} +%define release vs%{vsversion}.%{taglevel}%{?pldistro:.%{pldistro.vini}}%{?date:.%{date}} %{!?pldistro:%global pldistro planetlab} @@ -170,6 +170,7 @@ Patch660: linux-2.6-660-nmi-watchdog-default.patch Patch680: linux-2.6-680-htb-hysteresis-tso.patch Patch690: linux-2.6-690-web100.patch Patch700: linux-2.6-700-egre.patch +Patch710: linux-2.6-710-netns-unshare-kludge.patch BuildRoot: %{_tmppath}/kernel-%{KVERREL}-root @@ -358,15 +359,9 @@ KERNEL_PREVIOUS=vanilla %ApplyPatch 650 %ApplyPatch 660 %ApplyPatch 700 +%ApplyPatch 710 -# NetNS conflict-resolving patch for VINI. Will work with patch vini_pl_patch-1 but may -# break with later patches. - -%if 0%{?with_netns} -%ApplyPatch %vini_pl_patch -%endif - rm -fr linux-%{kversion} ln -sf $KERNEL_PREVIOUS linux-%{kversion} cd linux-%{kversion} diff --git a/linux-2.6-710-netns-unsharing-kludge.patch b/linux-2.6-710-netns-unsharing-kludge.patch new file mode 100644 index 000000000..999be92b8 --- /dev/null +++ b/linux-2.6-710-netns-unsharing-kludge.patch @@ -0,0 +1,21 @@ +diff -Nurb --exclude='*.a' --exclude='*.dbg' --exclude='*.order' --exclude='*.d' --exclude='*.elf' --exclude='*.o' --exclude='*.mod' --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags --exclude='*.patch' --exclude='*.diff' --exclude='*.svn*' linux-2.6.27-700/net/socket.c linux-2.6.27-710/net/socket.c +--- linux-2.6.27-700/net/socket.c 2009-04-16 21:55:22.000000000 -0400 ++++ linux-2.6.27-710/net/socket.c 2009-04-16 22:22:48.000000000 -0400 +@@ -1138,12 +1138,17 @@ + if (type < 0 || type >= SOCK_MAX) + return -EINVAL; + ++ /* ++ This fragment prevents net ns from being unshared when a vserver is created ++ via util-vserver-pl. Commenting out of Trellis for now. ++ + if (!nx_check(0, VS_ADMIN)) { + if (family == PF_INET && !current_nx_info_has_v4()) + return -EAFNOSUPPORT; + if (family == PF_INET6 && !current_nx_info_has_v6()) + return -EAFNOSUPPORT; + } ++ */ + + /* Compatibility. + -- 2.43.0