diff --git a/CHANGELOG b/CHANGELOG
index 096de34d7..06f046007 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -2,6 +2,9 @@
[NOT YET RELEASED]
+o Added a mac_addr_next_hop member to the host tables used in NSE.
+ [Michael Pattrick, kx].
+
o Removed the nmap_service.exe helper program for smb-psexec, as it
was still being flagged by malware detection even after the
bit-flipping in the next release. You can now download it from
diff --git a/docs/scripting.xml b/docs/scripting.xml
index 23629ef81..012715a7c 100644
--- a/docs/scripting.xml
+++ b/docs/scripting.xml
@@ -1323,6 +1323,16 @@ LUALIB_API int luaopen_openssl(lua_State *L) {
+
+
+
+
+ MAC addressMAC address
+ of the first hop in the route to the host, or
+ nil if not available.
+
+
+
diff --git a/nse_nmaplib.cc b/nse_nmaplib.cc
index f77eea11b..fa2c48358 100644
--- a/nse_nmaplib.cc
+++ b/nse_nmaplib.cc
@@ -162,6 +162,10 @@ void set_hostinfo(lua_State *L, Target *currenths) {
lua_pushlstring (L, (const char*)currenths->MACAddress() , 6);
lua_setfield(L, -2, "mac_addr");
}
+ if(currenths->NextHopMACAddress()){ // else nil
+ lua_pushlstring (L, (const char*)currenths->NextHopMACAddress() , 6);
+ lua_setfield(L, -2, "mac_addr_next_hop");
+ }
if(currenths->SrcMACAddress()){ // else nil
lua_pushlstring(L, (const char*)currenths->SrcMACAddress(), 6);
lua_setfield(L, -2, "mac_addr_src");