From 742a43571f5ced62d202f9582b97ebcdc31ec5a6 Mon Sep 17 00:00:00 2001 From: coolsnowwolf Date: Thu, 18 Apr 2019 12:33:20 +0800 Subject: [PATCH] kcptun: bump to 20190416 --- package/lean/kcptun/Makefile | 4 ++-- package/lean/luci-app-arpbind/Makefile | 3 +++ .../luasrc/model/cbi/arpbind.lua | 17 ++++++++++++----- .../lean/luci-app-arpbind/po/zh-cn/arpbind.po | 3 +++ 4 files changed, 20 insertions(+), 7 deletions(-) diff --git a/package/lean/kcptun/Makefile b/package/lean/kcptun/Makefile index 4fd39fc007..0c30380cb3 100644 --- a/package/lean/kcptun/Makefile +++ b/package/lean/kcptun/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=kcptun -PKG_VERSION:=20190401 +PKG_VERSION:=20190416 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/xtaci/kcptun/tar.gz/v$(PKG_VERSION)? -PKG_HASH:=70d01d99cc7ae5b77a0943c61377216a0f758d2b2ac3d60786af8f6e9a66065e +PKG_HASH:=0c60589872b87433da5d6dc045db1be3fdb9f3addb6458b0e5056c16dc4f86b0 PKG_LICENSE:=MIT PKG_LICENSE_FILES:=LICENSE.md diff --git a/package/lean/luci-app-arpbind/Makefile b/package/lean/luci-app-arpbind/Makefile index 7b95a3d4b6..e48ce83c58 100755 --- a/package/lean/luci-app-arpbind/Makefile +++ b/package/lean/luci-app-arpbind/Makefile @@ -8,6 +8,9 @@ include $(TOPDIR)/rules.mk LUCI_TITLE:=ARP Binding LUCI_DEPENDS:=+ip-full +LUCI_PKGARCH:=all +PKG_VERSION:=1 +PKG_RELEASE:=2 include $(TOPDIR)/feeds/luci/luci.mk diff --git a/package/lean/luci-app-arpbind/luasrc/model/cbi/arpbind.lua b/package/lean/luci-app-arpbind/luasrc/model/cbi/arpbind.lua index 0caaa0930d..1c5b1758d3 100644 --- a/package/lean/luci-app-arpbind/luasrc/model/cbi/arpbind.lua +++ b/package/lean/luci-app-arpbind/luasrc/model/cbi/arpbind.lua @@ -1,7 +1,4 @@ ---[[ - 静态ARP绑定 Luci页面 CBI page - Copyright (C) 2015 GuoGuo -]]-- + local sys = require "luci.sys" local ifaces = sys.net:devices() @@ -15,12 +12,22 @@ s.anonymous = true s.addremove = true a = s:option(Value, "ipaddr", translate("IP Address")) -a.datatype = "ipaddr" a.optional = false +a.datatype = "ipaddr" +luci.ip.neighbors({ family = 4 }, function(entry) + if entry.reachable then + a:value(entry.dest:string()) + end +end) a = s:option(Value, "macaddr", translate("MAC Address")) a.datatype = "macaddr" a.optional = false +luci.ip.neighbors({family = 4}, function(neighbor) + if neighbor.reachable then + a:value(neighbor.mac, "%s (%s)" %{neighbor.mac, neighbor.dest:string()}) + end +end) a = s:option(ListValue, "ifname", translate("Interface")) for _, iface in ipairs(ifaces) do diff --git a/package/lean/luci-app-arpbind/po/zh-cn/arpbind.po b/package/lean/luci-app-arpbind/po/zh-cn/arpbind.po index bcc53625f6..278f069ee0 100644 --- a/package/lean/luci-app-arpbind/po/zh-cn/arpbind.po +++ b/package/lean/luci-app-arpbind/po/zh-cn/arpbind.po @@ -17,5 +17,8 @@ msgstr "" msgid "IP/MAC Binding" msgstr "IP/MAC绑定" +msgid "MAC Address" +msgstr "MAC 地址" + msgid "ARP is used to convert a network address (e.g. an IPv4 address) to a physical address such as a MAC address.Here you can add some static ARP binding rules." msgstr "ARP协议是用于实现网络地址到物理地址转换的协议。在这里,你可以设置静态ARP绑定规则。"