diff --git a/debian/changelog b/debian/changelog index 93b069a..d906f16 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +ruby-linux-netlink (0.15-1+wheezy1) stable; urgency=low + + * New upstream release. + + -- Patrick J Cherry Tue, 21 Jan 2014 10:01:20 +0000 + ruby-linux-netlink (0.14-1+wheezy1) stable; urgency=low * New upstream release. diff --git a/lib/linux/netlink/nlsocket.rb b/lib/linux/netlink/nlsocket.rb index 47c70c3..5f6ba45 100644 --- a/lib/linux/netlink/nlsocket.rb +++ b/lib/linux/netlink/nlsocket.rb @@ -25,7 +25,7 @@ module Netlink # Check the sockaddr on a received message. Raises an error if the AF # is not AF_NETLINK or the PID is not 0 (this is important for security) def self.check_sockaddr(str) - af, pad, pid, groups = str.unpack(SOCKADDR_PACK) + af, _, pid, _ = str.unpack(SOCKADDR_PACK) raise "Bad AF #{af}!" if af != Socket::AF_NETLINK raise "Bad PID #{pid}!" if pid != 0 end @@ -135,8 +135,8 @@ module Netlink # (Compare: rtnl_talk in lib/libnetlink.c, with answer=NULL) def cmd(type, msg, flags=NLM_F_REQUEST, resp_type=NLMSG_ERROR, timeout=@timeout, sockaddr=SOCKADDR_DEFAULT) send_request(type, msg, flags|NLM_F_ACK, sockaddr) - receive_responses(true, timeout) do |type,msg| - return msg if type == resp_type + receive_responses(true, timeout) do |rtype,rmsg| + return rmsg if rtype == resp_type false end end @@ -144,7 +144,7 @@ module Netlink # Discard all waiting messages def drain while select([@socket], nil, nil, 0) - mesg, sender, rflags, controls = @socket.recvmsg + mesg, _, _, _ = @socket.recvmsg raise EOFError unless mesg end end @@ -209,7 +209,7 @@ module Netlink # kernel closes the socket. def recvmsg(timeout=@timeout) if select([@socket], nil, nil, timeout) - mesg, sender, rflags, controls = @socket.recvmsg + mesg, sender, _, _ = @socket.recvmsg raise EOFError unless mesg sender = sender.to_sockaddr if sender.respond_to? :to_sockaddr NLSocket.check_sockaddr(sender)