[Xorp-hackers] Some patches for various things.

Atanu Ghosh atanu at ICSI.Berkeley.EDU
Thu Oct 4 11:56:23 PDT 2007


>>>>> "Ben" == Ben Greear <greearb at candelatech.com> writes:

    Ben> Here are some more small patches.  At some time during the last
    Ben> few weeks I added these to try to work around problems related
    Ben> to dynamically adding/deleting interfaces & ospf configuration.
    Ben> It's possible subsequent fixes from Xorp developers have made
    Ben> these un-needed.


    Ben> Treat a duplicate remove as OK instead of an error.  This fixed
    Ben> some problem with reloading config files...

    Ben> RCS file: /cvs/xorp/fea/iftree.cc,v retrieving revision 1.51
    Ben> diff -u -r1.51 iftree.cc --- fea/iftree.cc 27 Sep 2007 00:33:33
    Ben> -0000 1.51 +++ fea/iftree.cc 3 Oct 2007 23:08:13 -0000 @@
    Ben> -1079,7 +1079,7 @@ IfTreeAddr4* ap = find_addr(addr);

    Ben> if (ap == NULL) - return (XORP_ERROR); + return XORP_OK; //
    Ben> Already deleted it seems... (XORP_ERROR);
    ap-> mark(DELETED);
    Ben> return (XORP_OK); }


    Ben> I prefer the log files to show the locations as file:line
    Ben> instead of the old +line format.

    Ben> RCS file: /cvs/xorp/libxorp/xlog.h,v retrieving revision 1.16
    Ben> diff -u -r1.16 xlog.h --- libxorp/xlog.h 20 Apr 2007 19:06:21
    Ben> -0000 1.16 +++ libxorp/xlog.h 3 Oct 2007 23:08:14 -0000 @@
    Ben> -101,8 +101,8 @@ #define XLOG_FN(fn, fmt...)  \ do { \ char
    Ben> xlog_where_buf[8000]; \ - snprintf(xlog_where_buf,
    Ben> sizeof(xlog_where_buf), "+%d %s %s", \ - __LINE__, __FILE__,
    Ben> __FUNCTION__); \ + snprintf(xlog_where_buf,
    Ben> sizeof(xlog_where_buf), "%s:%d %s", \ + __FILE__, __LINE__,
    Ben> __FUNCTION__); \ xlog_##fn(_XLOG_MODULE_NAME, xlog_where_buf,
    Ben> fmt); \ } while (0)


    Ben> This fixed an error in ospf.  I don't know if this is still
    Ben> needed, or even if it was ever the right thing to do.  Perhaps
    Ben> the OSPF folks could take a look and this...

    Ben> RCS file: /cvs/xorp/ospf/peer_manager.cc,v retrieving revision
    Ben> 1.146 diff -u -r1.146 peer_manager.cc --- ospf/peer_manager.cc
    Ben> 3 Oct 2007 21:23:53 -0000 1.146 +++ ospf/peer_manager.cc 3 Oct
    Ben> 2007 23:08:16 -0000 @@ -369,9 +369,12 @@ debug_msg("Interface
    Ben> %s Vif %s\n", interface.c_str(), vif.c_str()); string concat =
    Ben> interface + "/" + vif;

    Ben> - if (0 != _pmap.count(concat)) - xorp_throw(BadPeer, -
    Ben> c_format("Mapping for %s already exists", concat.c_str())); +
    Ben> if (0 != _pmap.count(concat)) { + // Don't think we really need
    Ben> to error here, just return what we already have. --Ben +
    Ben> //xorp_throw(BadPeer, + // c_format("Mapping for %s already
    Ben> exists", concat.c_str())); + return _pmap[concat]; + }
  			
    Ben> OspfTypes::PeerID peerid = _next_peerid++; _pmap[concat] =
    Ben> peerid;


    Ben> Thanks, Ben


    Ben> -- Ben Greear <greearb at candelatech.com> Candela Technologies
    Ben> Inc http://www.candelatech.com

    Ben> _______________________________________________ Xorp-hackers
    Ben> mailing list Xorp-hackers at icir.org
    Ben> http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-hackers



More information about the Xorp-hackers mailing list