Re: [OpenWrt-Devel] [PATCH 2/3] updated ramips dwc_otg USB driver (fixes USB 1.1 TT error)
On Fri, Apr 8, 2011 at 10:55 AM, Layne Edwards ledwa...@astrumtech.netwrote: This patch enables the hub Transaction Translators (TT) in the dwc_otg driver, thus enabling the driver to handle all speeds (both USB 2.0 and USB 1.1). This fixes the usb 1-1: parent hub has no TT error. This is a re-post of the entire dwc_otg driver, and therefore supersedes the previous version. Signed-off-by: Layne Edwards ledwa...@astrumtech.net Hi Layne, Your dwc_otg works. Thanks. However, I cannot select any of the USB devices support in the menuconfig and dwc_otg cannot be built as a module. Thanks. -Vincent ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] Version bump hd-idle 1.03
Version bump hd-idle to 1.03. 1.02 and 1.03 were bugfix releases. Signed-off-by: Ian Leonard antonla...@gmail.com --- Index: feeds/packages/utils/hd-idle/Makefile === --- feeds/packages/utils/hd-idle/Makefile (revision 26531) +++ feeds/packages/utils/hd-idle/Makefile (working copy) @@ -8,13 +8,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:=hd-idle -PKG_REV:=1.01 +PKG_REV:=1.03 PKG_VERSION:=$(PKG_REV) PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz PKG_SOURCE_URL:=@SF/$(PKG_NAME) -PKG_MD5SUM:=bfb7db4d4372d3954b7cd96a11956741 +PKG_MD5SUM:=049d6e6fc703a7e0474bdd9c24e6de77 +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) include $(INCLUDE_DIR)/package.mk ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] Add initscript for rsync daemon
Add an initscript to the rsync package for use as a daemon, and a sample rsyncd.conf to show a simple setup. Signed-off-by: Ian Leonard antonla...@gmail.com --- Index: feeds/packages/net/rsync/files/rsyncd.init === --- feeds/packages/net/rsync/files/rsyncd.init (revision 0) +++ feeds/packages/net/rsync/files/rsyncd.init (revision 0) @@ -0,0 +1,15 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2011 OpenWrt.org + +START=50 +BIN=/usr/bin/rsync +PID=/var/run/rsyncd.pid +SSD=start-stop-daemon + +start() { + $SSD -p $PID -S -x $BIN -- --daemon +} + +stop() { + $SSD -p $PID -K +} Index: feeds/packages/net/rsync/files/rsyncd.conf === --- feeds/packages/net/rsync/files/rsyncd.conf (revision 0) +++ feeds/packages/net/rsync/files/rsyncd.conf (revision 0) @@ -0,0 +1,15 @@ +# /etc/rsyncd.conf +# Minimal configuration for rsync daemon + +# Next line required for init script +pid file = /var/run/rsyncd.pid +use chroot = yes +uid = nobody +gid = nogroup +read only = yes + +# Simple example to configure server +#[openwrt-etc] +#path = /etc +#comment = OpenWrt Configuration Files +#exclude = /init.d Index: feeds/packages/net/rsync/Makefile === --- feeds/packages/net/rsync/Makefile (revision 26531) +++ feeds/packages/net/rsync/Makefile (working copy) @@ -9,7 +9,7 @@ PKG_NAME:=rsync PKG_VERSION:=3.0.8 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://rsync.samba.org/ftp/rsync/src @@ -49,6 +49,10 @@ --disable-acl-support \ define Package/rsync/install + $(INSTALL_DIR) $(1)/etc + $(INSTALL_DATA) ./files/rsyncd.conf $(1)/etc/ + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/rsyncd.init $(1)/etc/init.d/rsyncd $(INSTALL_DIR) $(1)/usr/bin $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$(PKG_NAME) $(1)/usr/bin/ endef ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] 802.1Q VLAN support for Infineon ADM6996 switch chip
On 7 April 2011 12:04, Peter Lebbing pe...@digitalbrains.com wrote: Any chance that you can get a datasheet for the FC chip? It would help implementing FC functionality a lot. I can ask them, but I doubt it. For what they care, I am not much more than a random guy on the internet ;-) Also since I don't have access to either device, I won't be able to do much more than giving advice (and I seriously doubt they will allow me to pass on the datasheet even if I get it). Jonas ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] 802.1Q VLAN support for Infineon ADM6996 switch chip for UBNT RouterStation
On 6 April 2011 16:18, Yeoh Chun Yeow yeohchuny...@gmail.com wrote: Hi, Jonas, UBNT RS has two ports connected to eth1, port 0 and port 1. If you connect your Ethernet cable to port 0 without first connecting Ethernet cable to port 1, it won't work. You will see a lot of messages Trying 100/FULL, Trying 10/HALF, Trying 10/HALF. Once you connect port 1 with Ethernet cable, you will only see the message eth1: link up (100Mbps/Full duplex) and the port 0 will function properly. Do you know why? After looking at the code several times, I have an Idea. Can you try the attached patch? It should apply to backfire (assuming you are using it), but is generated against trunk with the ADM6996 patch applied. Regards Jonas 0001-Handle-WAN-port-for-UBNT-Routerstation.patch Description: Binary data ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] rtl8366s/rb: Move PHY driver MII bus check into probe
Okay, disregard this patch. Equate on IRC was kind enough to test for me that at least the WNDR3700 is fine with having no Realtek PHY driver. I'll send a new one removing it. Jonas ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] 802.1Q VLAN support for Infineon ADM6996 switch chip for UBNT RouterStation
Yes, I am using the backfire version and will report my finding once I do it. On Fri, Apr 8, 2011 at 11:00 PM, Jonas Gorski jonas.gorski+open...@gmail.com wrote: On 6 April 2011 16:18, Yeoh Chun Yeow yeohchuny...@gmail.com wrote: Hi, Jonas, UBNT RS has two ports connected to eth1, port 0 and port 1. If you connect your Ethernet cable to port 0 without first connecting Ethernet cable to port 1, it won't work. You will see a lot of messages Trying 100/FULL, Trying 10/HALF, Trying 10/HALF. Once you connect port 1 with Ethernet cable, you will only see the message eth1: link up (100Mbps/Full duplex) and the port 0 will function properly. Do you know why? After looking at the code several times, I have an Idea. Can you try the attached patch? It should apply to backfire (assuming you are using it), but is generated against trunk with the ADM6996 patch applied. Regards Jonas ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH 2/3] updated ramips dwc_otg USB driver (fixes USB 1.1 TT error)
On Fri, 8 Apr 2011 15:26:08 +0800, HP Teoh wrote: On Fri, Apr 8, 2011 at 10:55 AM, Layne Edwards wrote: This patch enables the hub Transaction Translators (TT) in the dwc_otg driver, thus enabling the driver to handle all speeds (both USB 2.0 and USB 1.1). This fixes the usb 1-1: parent hub has no TT error. This is a re-post of the entire dwc_otg driver, and therefore supersedes the previous version. Signed-off-by: Layne Edwards Hi Layne, Your dwc_otg works. Thanks. However, I cannot select any of the USB devices support in the menuconfig and dwc_otg cannot be built as a module. After patching, delete the /tmp directory to force menuconfig to rebuild the menus (to enable the USB menu). Then you can get into the USB menu. The dwc_otg driver and usb-core will be in the kernel, so you will just need to select the USB devices you need in menuconfig (don't select ehci or ohci because dwc_otg doesn't need them). No kmod yet. Regards, Layne Links: -- [1] mailto:ledwa...@astrumtech.net [2] mailto:ledwa...@astrumtech.net ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] RTL8366S/RB: Remove the PHY driver.
Since the PHY driver is only used for the WAN port and there is virtually no difference between it and the generic PHY driver, we can sefely remove it. Signed-off-by: Jonas Gorski jonas.gorski+open...@gmail.com --- This has been tested on a WNDR3700 v1 and it didn't show any obvious problems; the WAN port was working fine. Some more testing might be needed though (especially since I can't test it myself - I don't own any device with one of the realtek switches). .../generic/files/drivers/net/phy/rtl8366rb.c | 53 +--- .../linux/generic/files/drivers/net/phy/rtl8366s.c | 53 +--- 2 files changed, 2 insertions(+), 104 deletions(-) diff --git a/target/linux/generic/files/drivers/net/phy/rtl8366rb.c b/target/linux/generic/files/drivers/net/phy/rtl8366rb.c index 90c37ad..640ed51 100644 --- a/target/linux/generic/files/drivers/net/phy/rtl8366rb.c +++ b/target/linux/generic/files/drivers/net/phy/rtl8366rb.c @@ -26,7 +26,6 @@ #define RTL8366RB_PHY_NO_MAX 4 #define RTL8366RB_PHY_PAGE_MAX 7 #define RTL8366RB_PHY_ADDR_MAX 31 -#define RTL8366RB_PHY_WAN 4 /* Switch Global Configuration register */ #define RTL8366RB_SGCR 0x @@ -1157,12 +1156,6 @@ static int rtl8366rb_mii_write(struct mii_bus *bus, int addr, int reg, u16 val) return err; } -static int rtl8366rb_mii_bus_match(struct mii_bus *bus) -{ - return (bus-read == rtl8366rb_mii_read - bus-write == rtl8366rb_mii_write); -} - static int rtl8366rb_setup(struct rtl8366_smi *smi) { int ret; @@ -1282,36 +1275,6 @@ static int __devinit rtl8366rb_probe(struct platform_device *pdev) return err; } -static int rtl8366rb_phy_config_init(struct phy_device *phydev) -{ - if (!rtl8366rb_mii_bus_match(phydev-bus)) - return -EINVAL; - - return 0; -} - -static int rtl8366rb_phy_config_aneg(struct phy_device *phydev) -{ - /* phy 4 might be connected to a second mac, allow aneg config */ - if (phydev-addr == RTL8366RB_PHY_WAN) - return genphy_config_aneg(phydev); - - return 0; -} - -static struct phy_driver rtl8366rb_phy_driver = { - .phy_id = 0x001cc960, - .name = Realtek RTL8366RB, - .phy_id_mask= 0x1ff0, - .features = PHY_GBIT_FEATURES, - .config_aneg= rtl8366rb_phy_config_aneg, - .config_init= rtl8366rb_phy_config_init, - .read_status= genphy_read_status, - .driver = { - .owner = THIS_MODULE, - }, -}; - static int __devexit rtl8366rb_remove(struct platform_device *pdev) { struct rtl8366_smi *smi = platform_get_drvdata(pdev); @@ -1337,26 +1300,12 @@ static struct platform_driver rtl8366rb_driver = { static int __init rtl8366rb_module_init(void) { - int ret; - ret = platform_driver_register(rtl8366rb_driver); - if (ret) - return ret; - - ret = phy_driver_register(rtl8366rb_phy_driver); - if (ret) - goto err_platform_unregister; - - return 0; - - err_platform_unregister: - platform_driver_unregister(rtl8366rb_driver); - return ret; + return platform_driver_register(rtl8366rb_driver); } module_init(rtl8366rb_module_init); static void __exit rtl8366rb_module_exit(void) { - phy_driver_unregister(rtl8366rb_phy_driver); platform_driver_unregister(rtl8366rb_driver); } module_exit(rtl8366rb_module_exit); diff --git a/target/linux/generic/files/drivers/net/phy/rtl8366s.c b/target/linux/generic/files/drivers/net/phy/rtl8366s.c index 7e72164..3f3d6f6 100644 --- a/target/linux/generic/files/drivers/net/phy/rtl8366s.c +++ b/target/linux/generic/files/drivers/net/phy/rtl8366s.c @@ -25,7 +25,6 @@ #define RTL8366S_PHY_NO_MAX4 #define RTL8366S_PHY_PAGE_MAX 7 #define RTL8366S_PHY_ADDR_MAX 31 -#define RTL8366S_PHY_WAN 4 /* Switch Global Configuration register */ #define RTL8366S_SGCR 0x @@ -986,12 +985,6 @@ static int rtl8366s_mii_write(struct mii_bus *bus, int addr, int reg, u16 val) return err; } -static int rtl8366s_mii_bus_match(struct mii_bus *bus) -{ - return (bus-read == rtl8366s_mii_read - bus-write == rtl8366s_mii_write); -} - static int rtl8366s_setup(struct rtl8366_smi *smi) { int ret; @@ -,36 +1104,6 @@ static int __devinit rtl8366s_probe(struct platform_device *pdev) return err; } -static int rtl8366s_phy_config_init(struct phy_device *phydev) -{ - if (!rtl8366s_mii_bus_match(phydev-bus)) - return -EINVAL; - - return 0; -} - -static int rtl8366s_phy_config_aneg(struct phy_device *phydev) -{ - /* phy 4 might be connected to a second mac, allow aneg config */ - if (phydev-addr == RTL8366S_PHY_WAN) - return genphy_config_aneg(phydev); - - return 0; -} - -static struct phy_driver
[OpenWrt-Devel] [PATCH 1/1] net/appletalk: missing symbols for Appletalk on 2.6.37 and later
CONFIG_COPS needs to be defined. Signed-off-by: Philip Prindeville phil...@redfish-solutions.com Index: target/linux/generic/config-2.6.32 === --- target/linux/generic/config-2.6.32 (revision 26531) +++ target/linux/generic/config-2.6.32 (working copy) @@ -1198,6 +1198,7 @@ # CONFIG_LSF is not set # CONFIG_LSI_ET1011C_PHY is not set # CONFIG_LTPC is not set +# CONFIG_COPS is not set # CONFIG_LXT_PHY is not set CONFIG_LZMA_COMPRESS=y CONFIG_LZMA_DECOMPRESS=y Index: target/linux/generic/config-2.6.35 === --- target/linux/generic/config-2.6.35 (revision 26531) +++ target/linux/generic/config-2.6.35 (working copy) @@ -1323,6 +1323,7 @@ # CONFIG_LSF is not set # CONFIG_LSI_ET1011C_PHY is not set # CONFIG_LTPC is not set +# CONFIG_COPS is not set # CONFIG_LXT_PHY is not set CONFIG_LZMA_COMPRESS=y CONFIG_LZMA_DECOMPRESS=y Index: target/linux/generic/config-2.6.37 === --- target/linux/generic/config-2.6.37 (revision 26531) +++ target/linux/generic/config-2.6.37 (working copy) @@ -1241,6 +1241,7 @@ # CONFIG_LP_CONSOLE is not set # CONFIG_LSI_ET1011C_PHY is not set # CONFIG_LTPC is not set +# CONFIG_COPS is not set # CONFIG_LXT_PHY is not set CONFIG_LZMA_COMPRESS=y CONFIG_LZMA_DECOMPRESS=y Index: target/linux/generic/config-2.6.38 === --- target/linux/generic/config-2.6.38 (revision 26531) +++ target/linux/generic/config-2.6.38 (working copy) @@ -1260,6 +1260,7 @@ # CONFIG_LP_CONSOLE is not set # CONFIG_LSI_ET1011C_PHY is not set # CONFIG_LTPC is not set +# CONFIG_COPS is not set # CONFIG_LXT_PHY is not set CONFIG_LZMA_COMPRESS=y CONFIG_LZMA_DECOMPRESS=y ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 1/1] linux-atm: allow including 'atmdiag' and 'atmdump' in fat version of atm-tools
If your ISP is pushing their own DSL equipment (which many do to contain support costs), they won't be forthcoming with your various settings: encapsulation, VPI/VCI, etc. These you might have to discover yourself. The easiest way to do this is with atmdiag and atmdump, but these aren't built by default. Signed-off-by: Philip Prindeville phil...@redfish-solutions.com Index: package/linux-atm/Makefile === --- package/linux-atm/Makefile (revision 26505) +++ package/linux-atm/Makefile (working copy) @@ -43,6 +43,17 @@ This package contains the Linux ATM tools. endef +define Package/atm-tools/config +config PACKAGE_atm-tools_extras + depends on PACKAGE_atm-tools + default n + bool Include atmdiag and atmdump + help + This option is useful for troubleshooting DSL issues if your ISP + isn't forthcoming with your configuration parameters (VPI, VCI, + encapsulation mode, etc). +endef + define Package/br2684ctl SECTION:=net CATEGORY:=Network @@ -100,8 +111,10 @@ # $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/esi $(1)/usr/sbin/ # $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/aread $(1)/usr/bin/ # $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/awrite $(1)/usr/bin/ -# $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/atmdiag $(1)/usr/bin/ -# $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/atmdump $(1)/usr/bin/ +ifeq ($(CONFIG_PACKAGE_atm-tools_extras),y) + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/atmdiag $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/atmdump $(1)/usr/bin/ +endif # # The following is really for some specific application, and obsolete for most of it # ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 1/1] linux-atm: package atm-diagnostics with atmdump, atmdiag, etc.
If your ISP is pushing their own DSL equipment (which many do to contain support costs), they won't be forthcoming with your various settings: encapsulation, VPI/VCI, etc. These you might have to discover yourself. The easiest way to do this is with atmdiag and atmdump. Signed-off-by: Philip Prindeville phil...@redfish-solutions.com Index: package/linux-atm/Makefile === --- package/linux-atm/Makefile (revision 26505) +++ package/linux-atm/Makefile (working copy) @@ -43,6 +43,18 @@ This package contains the Linux ATM tools. endef +define Package/atm-diagnostics + SECTION:=net + CATEGORY:=Network + DEPENDS:=linux-atm + TITLE:=Linux ATM Diagnostics + URL:=http://linux-atm.sourceforge.net/ +endef + +define Package/atm-diagnostics/description + This package contains the Linux ATM diagnostics. +endef + define Package/br2684ctl SECTION:=net CATEGORY:=Network @@ -121,6 +133,14 @@ # $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ttcp_atm $(1)/usr/bin/ endef +define Package/atm-diagnostics/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/aread $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/awrite $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/atmdiag $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/atmdump $(1)/usr/bin/ +endef + define Package/br2684ctl/install $(INSTALL_DIR) $(1)/etc/init.d/ $(INSTALL_BIN) ./files/br2684ctl $(1)/etc/init.d/ @@ -130,4 +150,5 @@ $(eval $(call BuildPackage,linux-atm)) $(eval $(call BuildPackage,atm-tools)) +$(eval $(call BuildPackage,atm-diagnostics)) $(eval $(call BuildPackage,br2684ctl)) ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 1/2] dnsmasq: direct address return option for uci config
With this commit the --address option of dnsmasq, directly returning ip addresses for certain domains instead of querying the dns server, can be configured in the dhcp uci configuration file. See the dnsmasq manpage for further details of this option. Signed-off-by: Linus Lüssing linus.luess...@web.de --- package/dnsmasq/files/dhcp.conf|1 + package/dnsmasq/files/dnsmasq.init |5 + 2 files changed, 6 insertions(+), 0 deletions(-) diff --git a/package/dnsmasq/files/dhcp.conf b/package/dnsmasq/files/dhcp.conf index 660b06a..5ba772e 100644 --- a/package/dnsmasq/files/dhcp.conf +++ b/package/dnsmasq/files/dhcp.conf @@ -15,6 +15,7 @@ config dnsmasq option leasefile'/tmp/dhcp.leases' option resolvfile '/tmp/resolv.conf.auto' #list server'/mycompany.local/1.2.3.4' + #list address '/whatever.domain/192.168.123.45' #option nonwildcard 1 #list interface br-lan #list notinterface lo diff --git a/package/dnsmasq/files/dnsmasq.init b/package/dnsmasq/files/dnsmasq.init index cd5a78a..8334b38 100644 --- a/package/dnsmasq/files/dnsmasq.init +++ b/package/dnsmasq/files/dnsmasq.init @@ -41,6 +41,10 @@ append_server() { append args -S $1 } +append_address() { + append args -A $1 +} + append_interface() { local ifname=$(uci_get_state network $1 ifname $1) append args -i $ifname @@ -88,6 +92,7 @@ dnsmasq() { append_parm $cfg domain -s append_parm $cfg local -S config_list_foreach $cfg server append_server + config_list_foreach $cfg address append_address config_list_foreach $cfg interface append_interface config_list_foreach $cfg notinterface append_notinterface config_list_foreach $cfg addnhosts append_addnhosts -- 1.7.4.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 2/2] dnsmasq: add option to avoid modifying resolv.conf
Currently, dnsmasq removes /tmp/resolv.conf (which is usually a symlink to /tmp/resolv.conf.auto) and creates its own resolv.conf with at least a nameserver pointing to 127.0.0.1. However, in some cases it might not be desired that the router itself queries its own dnsmasq dns-server but should query the upstream dns server - possibly fetched via an additional, local dhcp client - directly instead. With this new uci configuration option it is possible to prohibit dnsmasq to change /tmp/resolv.conf, leaving it as provided by the udhcpd. Signed-off-by: Linus Lüssing linus.luess...@web.de --- package/dnsmasq/files/dhcp.conf|1 + package/dnsmasq/files/dnsmasq.init |8 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/package/dnsmasq/files/dhcp.conf b/package/dnsmasq/files/dhcp.conf index 5ba772e..aa5f703 100644 --- a/package/dnsmasq/files/dhcp.conf +++ b/package/dnsmasq/files/dhcp.conf @@ -20,6 +20,7 @@ config dnsmasq #list interface br-lan #list notinterface lo #list bogusnxdomain '64.94.110.11' + option resolvconfuntouched 0 config dhcp lan option interfacelan diff --git a/package/dnsmasq/files/dnsmasq.init b/package/dnsmasq/files/dnsmasq.init index 8334b38..a578649 100644 --- a/package/dnsmasq/files/dnsmasq.init +++ b/package/dnsmasq/files/dnsmasq.init @@ -114,6 +114,8 @@ dnsmasq() { config_get hostsfile $cfg dhcphostsfile [ -e $hostsfile ] append args --dhcp-hostsfile=$hostsfile + config_get_bool resolvconfuntouched $cfg resolvconfuntouched + local rebind config_get_bool rebind $cfg rebind_protection 1 [ $rebind -gt 0 ] { @@ -389,8 +391,9 @@ start() { config_foreach dhcp_srv_add srvhost config_foreach dhcp_add dhcp - /usr/sbin/dnsmasq $args { + /usr/sbin/dnsmasq $args [ ! $resolvconfuntouched = 1 ] { rm -f /tmp/resolv.conf + echo ### Created by dnsmasq.init ### /tmp/resolv.conf [ -n $DOMAIN ] echo search $DOMAIN /tmp/resolv.conf DNS_SERVERS=$DNS_SERVERS 127.0.0.1 for DNS_SERVER in $DNS_SERVERS ; do @@ -400,7 +403,8 @@ start() { } stop() { - [ -f /tmp/resolv.conf ] { + [ -f /tmp/resolv.conf ] \ + [ `head -n1 /tmp/resolv.conf` = ### Created by dnsmasq.init ### ] { rm -f /tmp/resolv.conf ln -s /tmp/resolv.conf.auto /tmp/resolv.conf } -- 1.7.4.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH 2/2] dnsmasq: add option to avoid modifying resolv.conf
PS: I'm not so happy with this long uci option name, 'resolvconfuntouched', but couldn't come up with anything better yet. Something like 'upstreaminsteadoflocaldnsserver' would be more descriptive but, well, even longer... Suggestions (and feedback for this patch in general) welcome :). ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel