slirp: Honour vlan/stack in hostfwd_remove commands
PATCH 1/1 slirp: Honour vlan/stack in hostfwd_remove commands
The hostfwd_add and hostfwd_remove monitor commands allow the user to optionally specify a vlan/stack tuple. hostfwd_add honours this, but hostfwd_remove does not (it looks up the tuple but then ignores the SlirpState it has looked up and always uses the first stack in the list anyway). Correct this to honour what the user requested.
--- net/slirp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
net/slirp.c +1 -2
@@ -345,8 +345,7 @@ void net_slirp_hostfwd_remove(Monitor *mon, const QDict *qdict) host_port =atoi (p); - err =slirp_remove_hostfwd (QTAILQ_FIRST (&slirp_stacks)->slirp, is_udp, - host_addr, host_port); + err =slirp_remove_hostfwd (s->slirp, is_udp, host_addr, host_port);monitor_printf (mon,"host forwarding rule for %s %s\n" , src_str, err ?"not found" :"removed" );
Signature · 1 line
1.9.2
Quoted 26 lines · Peter Maydell
The
hostfwd_addandhostfwd_removemonitor commands allow the user to optionally specify a vlan/stack tuple.hostfwd_addhonours this, buthostfwd_removedoes not (it looks up the tuple but then ignores the SlirpState it has looked up and always uses the first stack in the list anyway). Correct this to honour what the user requested.Signed-off-by Peter Maydell <[email protected]>--- net/slirp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)net/slirp.c +1
-3@@ -345,8 +345,7 @@ void net_slirp_hostfwd_remove(Monitor *mon, const QDict *qdict) host_port =atoi (p); - err =slirp_remove_hostfwd (QTAILQ_FIRST (&slirp_stacks)->slirp, is_udp, - host_addr, host_port); + err =slirp_remove_hostfwd (s->slirp, is_udp, host_addr, host_port);monitor_printf (mon,"host forwarding rule for %s %s\n" , src_str, err ?"not found" :"removed" ); --
Quoted 1 line
1.9.2
Ping! (and cc trivial).
thanks
-- PMM
Quoted 24 lines · Peter Maydell
Quoted 23 lines · Peter Maydell
The
hostfwd_addandhostfwd_removemonitor commands allow the user to optionally specify a vlan/stack tuple.hostfwd_addhonours this, buthostfwd_removedoes not (it looks up the tuple but then ignores the SlirpState it has looked up and always uses the first stack in the list anyway). Correct this to honour what the user requested.Signed-off-by Peter Maydell <[email protected]>--- net/slirp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)net/slirp.c +1
-2@@ -345,8 +345,7 @@ void net_slirp_hostfwd_remove(Monitor *mon, const QDict *qdict) host_port =atoi (p); - err =slirp_remove_hostfwd (QTAILQ_FIRST (&slirp_stacks)->slirp, is_udp, - host_addr, host_port); + err =slirp_remove_hostfwd (s->slirp, is_udp, host_addr, host_port);
Quoted 6 lines
Quoted 4 lines
net/slirp.c +0
-1monitor_printf (mon,"host forwarding rule for %s %s\n" , src_str, err ?"not found" :"removed" ); --1.9.2
Ping! (and cc trivial).
Ping^2.
thanks
-- PMM
Quoted 25 lines · Peter Maydell
Quoted 24 lines · Peter Maydell
Quoted 23 lines · Peter Maydell
The
hostfwd_addandhostfwd_removemonitor commands allow the user to optionally specify a vlan/stack tuple.hostfwd_addhonours this, buthostfwd_removedoes not (it looks up the tuple but then ignores the SlirpState it has looked up and always uses the first stack in the list anyway). Correct this to honour what the user requested.Signed-off-by Peter Maydell <[email protected]>--- net/slirp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)net/slirp.c +1
-2@@ -345,8 +345,7 @@ void net_slirp_hostfwd_remove(Monitor *mon, const QDict *qdict) host_port =atoi (p); - err =slirp_remove_hostfwd (QTAILQ_FIRST (&slirp_stacks)->slirp, is_udp, - host_addr, host_port); + err =slirp_remove_hostfwd (s->slirp, is_udp, host_addr, host_port);
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
net/slirp.c +0
-1monitor_printf (mon,"host forwarding rule for %s %s\n" , src_str, err ?"not found" :"removed" ); --1.9.2
Ping! (and cc trivial).
Ping^2.
Ping^3 :-(
-- PMM
Quoted 33 lines · Peter Maydell
Quoted 32 lines · Peter Maydell
Quoted 30 lines · Peter Maydell
Quoted 26 lines · Peter Maydell
The
hostfwd_addandhostfwd_removemonitor commands allow the user to optionally specify a vlan/stack tuple.hostfwd_addhonours this, buthostfwd_removedoes not (it looks up the tuple but then ignores the SlirpState it has looked up and always uses the first stack in the list anyway). Correct this to honour what the user requested.Signed-off-by Peter Maydell <[email protected]>--- net/slirp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)net/slirp.c +1
-3@@ -345,8 +345,7 @@ void net_slirp_hostfwd_remove(Monitor *mon, const QDict *qdict) host_port =atoi (p); - err =slirp_remove_hostfwd (QTAILQ_FIRST (&slirp_stacks)->slirp, is_udp, - host_addr, host_port); + err =slirp_remove_hostfwd (s->slirp, is_udp, host_addr, host_port);monitor_printf (mon,"host forwarding rule for %s %s\n" , src_str, err ?"not found" :"removed" ); --Quoted 1 line
1.9.2
Ping! (and cc trivial).
Quoted 3 lines
Quoted 1 line
Ping^2.
Ping^3 :-(
Sorry, you will probably need someone else for these topics. I've difficulties scheduling these into my todo list. :(
Jan
Signature · 2 lines
Siemens AG, Corporate Technology, CT RTC ITP SES-DE Corporate Competence Center Embedded Linux
Quoted 6 lines · Peter Maydell
Quoted 5 lines · Peter Maydell
The
hostfwd_addandhostfwd_removemonitor commands allow the user to optionally specify a vlan/stack tuple.hostfwd_addhonours this, buthostfwd_removedoes not (it looks up the tuple but then ignores the SlirpState it has looked up and always uses the first stack in the list anyway). Correct this to honour what the user requested.
I've applied this to -trivial. Somehow this patch has been marked as "handled" in my queue, but actually it weren't - that's why I haven't really seen the pings.
Thanks,
/mjt