Skip to content

BeStateless/gobgp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GoBGP

This is the Stateless fork of GoBGP. Instead of maintaining a normal git fork we use stgit to maintain a patchset. This simplifies things by keeping the upstream history entirely outside of our repo and the set of stateless-specific patches is very clear. This should make it easy to incorporate our changes upstream while pulling in new changes from upstream regularly.

Obtaining the Patched Code

First, install stgit through your package manager, e.g. apt-get install stgit or zypper in stgit. Alternatively, you can clone the stgit repo and install it manually if you want to run the latest and greatest version.

Next, run the patch program from the repository root directory (sibling to this file).

./patch

Now the patched code is in the gobgp directory in the repository root with stgit set up on the tip of the patch set.

Making New Changes

To make a new patch simply use stg new patch-name.patch, edit the files you want to include in the patch, use stg refresh to incorporate those changes into the patch, and finally use stg export -d ../patches from the inner gobgp directory to export the new patch. Modifying an existing patch, reordering patches, rebasing onto newer upstream changes, and other operations are explained in the stgit tutorial.

Docker Container

A docker container can be built for GoBGP that is configured to use a unix socket via socat for API access. Simply execute the following command from the repository root to build the container.

docker build . -f docker/Dockerfile