~ubuntu-branches/ubuntu/jaunty/xorp/jaunty

« back to all changes in this revision

Viewing changes to rip/peer.cc

  • Committer: Bazaar Package Importer
  • Author(s): Jose Calhariz, Javier Fernandez-Sanguino, Jose Calhariz
  • Date: 2008-01-23 01:24:37 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20080123012437-7l2u9r0k8e7op8st
Tags: 1.5~cvs.20080128-1
[ Javier Fernandez-Sanguino ]
* Update to latest CVS contents
* Modify debian/rules to prevent autobuilders from building 
  the binary-independent components: (Closes: #441121)
  - Create a new Build-Depends-Indep with all the TeX
  components used to build documentation
  - Since autobuilders call build, which in turns calls build-indep, hack
    the debian rules file so that the documentation is only built if ps2pdf,
    dvips and pslatex are available. 
* Modify the init.d script:
  - restart action: Do not attempt to stop xorp if not running
  - stop function: fix errors in the script
  - add a try-restart action
  - restructure the init.d script, move the restart code to a function
  - review the use of echo calls and exit values
* Use, as examples, the new boot files at rtrmgr/config/

[ Jose Calhariz ]
* Add depends on ncurses-dev, I don't know why xorp use tigetstr
  function from curses.  This way the depends field change less between
  build environments.
* Removed pushd and popd commands from Makefile and replaced with cd
  commands, was a bashism and FTBFS (closes: #453637)
* debian/control converted to utf-8 (closes: #454026) (closes: #453485)
* init.d/xorp now returns 0 if disabled.
* Added Vcs-Browser and Vcs-Svn fields pointing to the repository of the
  package.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
// -*- c-basic-offset: 4; tab-width: 8; indent-tabs-mode: t -*-
2
2
 
3
 
// Copyright (c) 2001-2007 International Computer Science Institute
 
3
// Copyright (c) 2001-2008 International Computer Science Institute
4
4
//
5
5
// Permission is hereby granted, free of charge, to any person obtaining a
6
6
// copy of this software and associated documentation files (the "Software")
12
12
// notice is a summary of the XORP LICENSE file; the license in that file is
13
13
// legally binding.
14
14
 
15
 
#ident "$XORP: xorp/rip/peer.cc,v 1.7 2007/02/16 22:47:14 pavlin Exp $"
 
15
#ident "$XORP: xorp/rip/peer.cc,v 1.9 2008/01/04 03:17:31 pavlin Exp $"
16
16
 
17
17
#include "peer.hh"
18
18
#include "port.hh"
76
76
                      uint32_t          tag,
77
77
                      const PolicyTags& policytags)
78
78
{
 
79
    string ifname, vifname;
 
80
 
 
81
    // Get the interface and vif name
 
82
    if (port().io_handler() != NULL) {
 
83
        ifname = port().io_handler()->ifname();
 
84
        vifname = port().io_handler()->vifname();
 
85
    }
 
86
 
79
87
    Route* route = _peer_routes.find_route(net);
80
88
    if (route == NULL) {
81
89
        RouteEntryOrigin<A>* origin = &_peer_routes;
82
 
        route = new Route(net, nexthop, cost, origin, tag, policytags);
 
90
        route = new Route(net, nexthop, ifname, vifname,
 
91
                          cost, origin, tag, policytags);
83
92
    }
84
93
    set_expiry_timer(route);
85
94
 
86
95
    RouteDB<A>& rdb = _port.port_manager().system().route_db();
87
 
    return (rdb.update_route(net, nexthop, cost, tag, this, policytags,
88
 
                             false));
 
96
    return (rdb.update_route(net, nexthop, ifname, vifname, cost, tag, this,
 
97
                             policytags, false));
89
98
}
90
99
 
91
100
template <typename A>
102
111
    typename vector<const RouteEntry<A>*>::const_iterator ri;
103
112
    for (ri = routes.begin(); ri != routes.end(); ++ri) {
104
113
        const RouteEntry<A>* r = *ri;
105
 
        rdb.update_route(r->net(), r->nexthop(), r->cost(), r->tag(),
106
 
                         this, r->policytags(), true);
 
114
        rdb.update_route(r->net(), r->nexthop(), r->ifname(), r->vifname(),
 
115
                         r->cost(), r->tag(), this, r->policytags(), true);
107
116
    }
108
117
}
109
118