Git Product home page Git Product logo

beeper's People

Contributors

samrussell avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

beeper's Issues

Notification message handling

We don't know how to handle these - the app dies, which kind of helps, but it should probably handle it gracefully and return to active state

BGP Update message

We need to handle Update messages, which allows us to not blow up when we receive routes, but also allows us to share routes in the future

Non-blocking socket polling

Need a way to check if we have enough data on the socket to continue rather than blocking. There's a rare case where we get half a BGP message and need to cache the first half, but it'll happen often enough that we'll get into trouble if we don't handle that correctly.

Pack route update messages

They unpack ok (breaking the RFC by not preserving transient options), need to make them pack so we can send route updates

Implement the passive state machine

From the RFC (ignore the manualstart/stop events)

Active

  • When an Open message is received:
    -- Ignore contents of the Open message (handle Open and BGP error checking in another issue)
    -- Send an Open message
    -- Send a Keepalive message
    -- Advance to OpenConfirm
    -- Start the keepalive and hold timers (should be based on the open message but just use config for now)
  • When a Notification message is received:
    -- Move to the idle state (no way out of there)
    -- It is up to the holder of the Beeper to handle the socket (we need some way to alert when this happens)
  • When a Shutdown event is received:
    -- Move to the idle state (no way out of there)
    -- It is up to the holder of the Beeper to handle the socket
  • When any other event happens (mainly Update message, possibly more timers later on but make this a catch-all):
    -- Move to the idle state (no way out of there)
    -- It is up to the holder of the Beeper to handle the socket (we need some way to alert when this happens)

OpenConfirm

  • When a Shutdown event is received:
    -- Send a notification message with Cease
    -- Move to the idle state (no way out of there)
    -- It is up to the holder of the Beeper to handle the socket
  • When the hold timer expires (timer expired event and hold timer is done)
    -- Send a notification message with error code hold timer expired
    -- Move to the idle state (no way out of there)
    -- It is up to the holder of the Beeper to handle the socket (we need some way to alert when this happens)
  • When the keepalive timer expires (timer expired event and keepalive timer is done)
    -- Send a keepalive message and reset the timer
  • When a Keepalive message is received:
    -- Reset the hold timer
    -- Move to the Established state
  • When a Notification message is received:
    -- Move to the idle state (no way out of there)
    -- It is up to the holder of the Beeper to handle the socket (we need some way to alert when this happens)
  • When an Open message is received:
    -- Send a notification message with Cease
    -- Move to the idle state (no way out of there)
    -- It is up to the holder of the Beeper to handle the socket (we need some way to alert when this happens)
  • When any other event happens (mainly Update message, possibly more timers later on but make this a catch-all):
    -- Send a notification message with error code Finite State Machine Error
    -- Move to the idle state (no way out of there)
    -- It is up to the holder of the Beeper to handle the socket (we need some way to alert when this happens)

Established

  • Normal processing for Keepalive and Update messages (resetting hold timer)
  • Process everything else like OpenConfirm (except Keepalive keeps us in this state)
  • No error detection here yet (we'll accept messages with valid headers that parse correctly)

Give feedback when in the idle state

When we move to the idle state nothing is really defined - we should throw an error or something once we end up in idle (possibly raise an event when transitioning here too)

Move to eventlet

We use gevent here, using eventlet might let it play a bit nicer with faucet

IPv6 support

Handle both IPv4 and IPv6 peers and route updates

Header and message content checking

We just accept things (I think it explodes on bad marker), but we need to deal with them correctly (mostly by firing off notification messages and exiting)

Inject config into Beeper

We've got hardcoded values in Beeper - let them be passed in as part of init, and maybe some sane defaults for others

Timer support

We don't handle keepalive or hold timers in the base case (run.py), these need to send a keepalive or kill the session when triggered, and also be replenished when we send or receive a keepalive, respectively

Send routes

Need a way to send routes - mandatory fields are origin, AS path (just use self) and next_hop

BGP capabilities support

We ignore the capabilities field when doing open messages, this probably isn't the end of the world but needs to be handled at some point

Make package

Make this into a package that we can pip install

Handle route withdrawals

Might be able to go live without this, not really my call, but it does seem like a useful feature

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.