Skip to content

Commit

Permalink
Update server.go
Browse files Browse the repository at this point in the history
  • Loading branch information
skadarnold committed Jul 18, 2024
1 parent f1fe5a6 commit ccc0d83
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions ppp/pptp/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ import (

"github.com/skadarnold/ipxbox/network"
"github.com/skadarnold/ipxbox/ppp"
"github.com/skadarnold/ipxbox/ipxbox"


"github.com/skadarnold/ipxbox/ipx"
"github.com/skadarnold/ipxbox/ipxpkt"

Check failure on line 18 in ppp/pptp/server.go

View workflow job for this annotation

GitHub Actions / build

"github.com/skadarnold/ipxbox/ipxpkt" imported and not used
"github.com/skadarnold/ipxbox/network/addressable"

Check failure on line 19 in ppp/pptp/server.go

View workflow job for this annotation

GitHub Actions / build

"github.com/skadarnold/ipxbox/network/addressable" imported and not used
Expand Down Expand Up @@ -121,6 +120,16 @@ func (c *Connection) Close() error {
}
}

func makePcapWriter() *pcapgo.Writer {
f, err := os.Create(*dumpPackets)

Check failure on line 124 in ppp/pptp/server.go

View workflow job for this annotation

GitHub Actions / build

undefined: os

Check failure on line 124 in ppp/pptp/server.go

View workflow job for this annotation

GitHub Actions / build

undefined: dumpPackets
if err != nil {
log.Fatalf("failed to open pcap file for write: %v", err)

Check failure on line 126 in ppp/pptp/server.go

View workflow job for this annotation

GitHub Actions / build

undefined: log
}
w := pcapgo.NewWriter(f)
w.WriteFileHeader(1500, layers.LinkTypeEthernet)
return w
}

func (c *Connection) startPPPSession(ctx context.Context, sendCallID uint16) {
if c.ppp != nil {
return
Expand Down

0 comments on commit ccc0d83

Please sign in to comment.