Skip to content

Commit

Permalink
Remove more mentions of xdp
Browse files Browse the repository at this point in the history
  • Loading branch information
NHAS committed Oct 14, 2024
1 parent 0b1c087 commit 5dc7290
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion adminui/templates/diagnostics/route_checker.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<div class="card-header py-3">
<h1 class="m-0 text-gray-900">Firewall Decision</h6>
<p>
Test the xdp firewall decision for a given user with traffic, this tool will run a test packet through
Test the firewall decision for a given user with traffic, this tool will run a test packet through
the program and get allow or drop.
</p>
</div>
Expand Down
2 changes: 1 addition & 1 deletion internal/mfaportal/web.go
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,7 @@ func (mp *MfaPortal) routes(w http.ResponseWriter, r *http.Request) {

routes, err := mp.firewall.GetRoutes(user.Username)
if err != nil {
log.Println(user.Username, remoteAddress, "Getting routes from xdp failed: ", err)
log.Println(user.Username, remoteAddress, "Getting routes from firewall failed: ", err)
http.Error(w, "Server Error", http.StatusInternalServerError)
return
}
Expand Down
4 changes: 0 additions & 4 deletions internal/router/iptables.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@ func (f *Firewall) setupIptables() error {

devName := config.Values.Wireguard.DevName

//So. This to the average person will look like we say "Hey server forward anything and everything from the wireguard interface"
//And without the xdp ebpf program it would be, however if you look at xdp.c you can see that we can manipulate maps of addresses for each user
//This then controls whether the packet is dropped, but we still need iptables to do the higher level routing stuffs

err = ipt.ChangePolicy("filter", "FORWARD", "DROP")
if err != nil {
return err
Expand Down
2 changes: 1 addition & 1 deletion internal/router/wireguard.go
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ func (f *Firewall) setPeerEndpoint(device data.Device, endpoint *net.UDPAddr) er
return nil
}

// Remove a wireguard peer from xdp firewall and wg device
// Remove a wireguard peer from firewall and wg device
func (f *Firewall) RemovePeer(publickey, address string) error {
f.Lock()
defer f.Unlock()
Expand Down

0 comments on commit 5dc7290

Please sign in to comment.