{"id":808367,"url":"http://patchwork.ozlabs.org/api/patches/808367/?format=json","web_url":"http://patchwork.ozlabs.org/project/lede/patch/1504199858-7889-1-git-send-email-karlp@etactica.com/","project":{"id":54,"url":"http://patchwork.ozlabs.org/api/projects/54/?format=json","name":"LEDE development","link_name":"lede","list_id":"lede-dev.lists.infradead.org","list_email":"lede-dev@lists.infradead.org","web_url":"http://lede-project.org/","scm_url":"","webscm_url":"http://git.lede-project.org/","list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<1504199858-7889-1-git-send-email-karlp@etactica.com>","list_archive_url":null,"date":"2017-08-31T17:17:38","name":"[LEDE-DEV] RFC [PATCH] odhcpd: don't enable server mode on dhcp lan","commit_ref":null,"pull_url":null,"state":"changes-requested","archived":false,"hash":"520aea80bf6d25cd51b18248dd78c5413310dd0d","submitter":{"id":70060,"url":"http://patchwork.ozlabs.org/api/people/70060/?format=json","name":"Karl Palsson","email":"karlp@etactica.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/lede/patch/1504199858-7889-1-git-send-email-karlp@etactica.com/mbox/","series":[{"id":886,"url":"http://patchwork.ozlabs.org/api/series/886/?format=json","web_url":"http://patchwork.ozlabs.org/project/lede/list/?series=886","date":"2017-08-31T17:17:38","name":"[LEDE-DEV] RFC [PATCH] odhcpd: don't enable server mode on dhcp lan","version":1,"mbox":"http://patchwork.ozlabs.org/series/886/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/808367/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/808367/checks/","tags":{},"related":[],"headers":{"Return-Path":"<lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org; spf=none (mailfrom)\n\tsmtp.mailfrom=lists.infradead.org (client-ip=65.50.211.133;\n\thelo=bombadil.infradead.org;\n\tenvelope-from=lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org header.b=\"KumL72+Z\"; \n\tdkim-atps=neutral"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xjpxr2z37z9s81\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri,  1 Sep 2017 03:18:55 +1000 (AEST)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dnT73-0004U1-D8; Thu, 31 Aug 2017 17:18:41 +0000","from palmtree.beeroclock.net ([178.79.160.154])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dnT6i-00045r-ET\n\tfor lede-dev@lists.infradead.org; Thu, 31 Aug 2017 17:18:23 +0000","from cuth.localdomain.localdomain (rtr1.dogg-hlidasmara14.sip.is\n\t[178.19.53.178])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits))\n\t(No client certificate requested) (Authenticated sender: karlp)\n\tby palmtree.beeroclock.net (Postfix) with ESMTPSA id A70FA101C0;\n\tThu, 31 Aug 2017 17:17:47 +0000 (UTC)"],"DKIM-Signature":"v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe:\n\tList-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Subject:Message-Id:\n\tDate:To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:\n\tResent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:\n\tList-Owner; bh=Mdx0P2QU/yTLbDW2zZDEHx3vzS8AJWRPnhiVrElFlwM=;\n\tb=KumL72+ZaryIsB\n\tS1XUIQsUvEVCyaVSPw1KBv8FBL0MKK/enOK7U5qJVcllx56EulzJHvJeaOAMtmnQZBOgzIpjmN1wi\n\t/nE97H3z2f2po+uci65BBGbig4Ld+vTjcg0bTrW6cI1cla9uIS+x1t6qq1tUfkIkyqCsgMCYGcqfo\n\ttuxsjfomeTXxMABfVNUfwet2ijW8X7/1wA6j57Mn/wTdY1NBDXzhSk/xDxu5Nk9z/ani1AQjNoTdE\n\tAGinkIl1i9Hlq6GPxrTfLmztZFc6zI/ikVScWF0ElcPOWEkEZqXbepgZYIBMnDzAl9IF1bELSjSpc\n\tAPhz1fyTYCdNTsDb3V5A==;","From":"Karl Palsson <karlp@etactica.com>","To":"lede-dev@lists.infradead.org","Date":"Thu, 31 Aug 2017 17:17:38 +0000","Message-Id":"<1504199858-7889-1-git-send-email-karlp@etactica.com>","X-Mailer":"git-send-email 2.4.11","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20170831_101820_747573_BAC22EE7 ","X-CRM114-Status":"UNSURE (   7.14  )","X-CRM114-Notice":"Please train this message.","X-Spam-Score":"-1.9 (-)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-1.9 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t0.0 SPF_FAIL SPF: sender does not match SPF record (fail)\n\t[SPF failed: Please see http://www.openspf.org/Why?s=mfrom;\n\tid=karlp%40etactica.com; ip=178.79.160.154; r=bombadil.infradead.org]\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]","Subject":"[LEDE-DEV] RFC [PATCH] odhcpd: don't enable server mode on dhcp lan","X-BeenThere":"lede-dev@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<lede-dev.lists.infradead.org>","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/lede-dev>,\n\t<mailto:lede-dev-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/lede-dev/>","List-Post":"<mailto:lede-dev@lists.infradead.org>","List-Help":"<mailto:lede-dev-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/lede-dev>,\n\t<mailto:lede-dev-request@lists.infradead.org?subject=subscribe>","Cc":"Karl Palsson <karlp@etactica.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"\"Lede-dev\" <lede-dev-bounces@lists.infradead.org>","Errors-To":"lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org"},"content":"Instead of blindly enabling the odhcpd v6 server and RA server on the\nlan port, only do that if the lan port isn't set to DHCP.\n\nThis prevents the unhelpful case of a device being a dhcpv4 client and\nv6 server on the same ethernet port.\n\nSigned-off-by: Karl Palsson <karlp@etactica.com>","diff":"diff --git a/package/network/services/odhcpd/files/odhcpd.defaults b/package/network/services/odhcpd/files/odhcpd.defaults\nindex e184da90acbb..152e63dd18b6 100644\n--- a/package/network/services/odhcpd/files/odhcpd.defaults\n+++ b/package/network/services/odhcpd/files/odhcpd.defaults\n@@ -2,13 +2,23 @@\n uci -q get dhcp.odhcpd && exit 0\n touch /etc/config/dhcp\n \n+LANPROTO=$(uci -q get network.lan.proto)\n+MODE=server\n+\n+case \"$LANPROTO\" in\n+\"dhcp\")\n+\techo \"odhcpd: Not enabling server mode on a dhcp lan!\" > /dev/kmsg\n+\tMODE=disabled\n+\t;;\n+esac\n+\n uci batch <<EOF\n set dhcp.odhcpd=odhcpd\n set dhcp.odhcpd.maindhcp=0\n set dhcp.odhcpd.leasefile=/tmp/hosts/odhcpd\n set dhcp.odhcpd.leasetrigger=/usr/sbin/odhcpd-update\n set dhcp.odhcpd.loglevel=4\n-set dhcp.lan.dhcpv6=server\n-set dhcp.lan.ra=server\n+set dhcp.lan.dhcpv6=$MODE\n+set dhcp.lan.ra=$MODE\n commit dhcp\n EOF\n","prefixes":["LEDE-DEV"]}