[Libvir] brSetForwardDelay / brSetEnableSTP

This code in qemu_driver.c doesn't look right to me. I think the second should be a call to brSetEnableSTP? Rich. if (network->def->forwardDelay && (err = brSetForwardDelay(driver->brctl, network->bridge, network->def->forwardDelay))) { qemudReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR, "failed to set bridge forward delay to %d\n", network->def->forwardDelay); goto err_delbr; } if ((err = brSetForwardDelay(driver->brctl, network->bridge, network->def->disableSTP ? 0 : 1))) { qemudReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR, "failed to set bridge STP to %s\n", network->def->disableSTP ? "off" : "on"); goto err_delbr; } -- Emerging Technologies, Red Hat - http://et.redhat.com/~rjones/ Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SL4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 03798903

On Tue, Nov 20, 2007 at 03:19:42PM +0000, Richard W.M. Jones wrote:
This code in qemu_driver.c doesn't look right to me. I think the second should be a call to brSetEnableSTP?
Rich.
if (network->def->forwardDelay && (err = brSetForwardDelay(driver->brctl, network->bridge, network->def->forwardDelay))) { qemudReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR, "failed to set bridge forward delay to %d\n", network->def->forwardDelay); goto err_delbr; }
if ((err = brSetForwardDelay(driver->brctl, network->bridge, network->def->disableSTP ? 0 : 1))) { qemudReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR, "failed to set bridge STP to %s\n", network->def->disableSTP ? "off" : "on"); goto err_delbr; }
Yep, that second call is bogus. Guess no one has used this particular functionality, or at least not noticed it ;-) Dan. -- |=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=| |=- Perl modules: http://search.cpan.org/~danberr/ -=| |=- Projects: http://freshmeat.net/~danielpb/ -=| |=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=|

Proposed patch. I'm going to apply this one unless anyone objects, because it seems simple / obvious enough. Rich. -- Emerging Technologies, Red Hat - http://et.redhat.com/~rjones/ Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SL4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 03798903

On Wed, Nov 21, 2007 at 11:34:27AM +0000, Richard W.M. Jones wrote:
Proposed patch. I'm going to apply this one unless anyone objects, because it seems simple / obvious enough.
Go for it. Dan. -- |=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=| |=- Perl modules: http://search.cpan.org/~danberr/ -=| |=- Projects: http://freshmeat.net/~danielpb/ -=| |=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=|
participants (2)
-
Daniel P. Berrange
-
Richard W.M. Jones