Giter VIP home page Giter VIP logo

arp_standin's People

Contributors

danielpgross avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

qqq-tech justizin

arp_standin's Issues

FeatReq: implement in OpenWRT

Great blog post! I found an earlier post about your use of OpenWRT too. I know OpenWRT has Avahi, which could replace the mdns portion, but was not able to find anything about arp stand-in on OpenWRT.

I'd love to see the capability developed so your arp stand-in feature is handled entirely within OpenWRT, as that would free up your RPi for your next awesome project. Ruby is available in OpenWRT, as is lua and of course native C. A next-level solution would even include a gui extension for luci.

Also, I resorted to an issue in github as you don't have comments enabled on your blog... :)

raspberry pi - unable to start service

./bin/setup

bundle install
+ bundle install
Using rake 13.0.1
Using pcaprub 0.13.1
Using packetfu 1.1.13
Using arp_standin 0.1.0 from source at `.` and installing its executables
Using bundler 2.4.8
Bundle complete! 2 Gemfile dependencies, 5 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
bundle exec rake install

arp_standin 0.1.0 built to pkg/arp_standin-0.1.0.gem.
arp_standin (0.1.0) installed.
# Create systemd service
sudo cp arp-standin.example.service /etc/systemd/system/arp-standin.service
sudo nano /etc/systemd/system/arp-standin.service
# Be sure to set the three configuration environment variables:
# STANDIN_MAC_ADDR: The MAC address of the machine to answer on behalf of.
# STANDIN_IP_ADDR: The IP address of the machine to answer on behalf of.
# NETWORK_INTERFACE: The network interface to send/receive on.


# โœ… done
sudo systemctl daemon-reload
sudo systemctl enable arp-standin.service
sudo systemctl start arp-standin.service
systemctl status arp-standin.service # ๐Ÿ‘ˆ error see below
arp-standin.service - ARP Stand-in
     Loaded: loaded (/etc/systemd/system/arp-standin.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Sun 2023-04-23 17:21:36 PDT; 4s ago
    Process: 8173 ExecStart=/usr/local/bin/arp_standin (code=exited, status=203/EXEC)
   Main PID: 8173 (code=exited, status=203/EXEC)
        CPU: 33ms

Apr 23 17:21:36 torrentpi systemd[1]: Started ARP Stand-in.
Apr 23 17:21:36 torrentpi systemd[8173]: arp-standin.service: Failed to locate executable /usr/local/bin/arp_standin: No such file or di>
Apr 23 17:21:36 torrentpi systemd[8173]: arp-standin.service: Failed at step EXEC spawning /usr/local/bin/arp_standin: No such file or d>
Apr 23 17:21:36 torrentpi systemd[1]: arp-standin.service: Main process exited, code=exited, status=203/EXEC
lines 1-11...skipping...
โ— arp-standin.service - ARP Stand-in
โ— arp-standin.service - ARP Stand-in
     Loaded: loaded (/etc/systemd/system/arp-standin.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Sun 2023-04-23 17:21:36 PDT; 4s ago
    Process: 8173 ExecStart=/usr/local/bin/arp_standin (code=exited, status=203/EXEC)
   Main PID: 8173 (code=exited, status=203/EXEC)
        CPU: 33ms

Apr 23 17:21:36 torrentpi systemd[1]: Started ARP Stand-in.
Apr 23 17:21:36 torrentpi systemd[8173]: arp-standin.service: Failed to locate executable /usr/local/bin/arp_standin: No such file or di>
Apr 23 17:21:36 torrentpi systemd[8173]: arp-standin.service: Failed at step EXEC spawning /usr/local/bin/arp_standin: No such file or d>
Apr 23 17:21:36 torrentpi systemd[1]: arp-standin.service: Main process exited, code=exited, status=203/EXEC
Apr 23 17:21:36 torrentpi systemd[1]: arp-standin.service: Failed with result 'exit-code'.
ruby -v

ruby 3.2.2 (2023-03-30 revision e51014f9c0) [armv7l-linux-eabihf]

unable to install on raspberry pi

ruby -v
ruby 2.7.4p191 (2021-07-07 revision a21a3b7d23) [arm-linux-gnueabihf]

gem -v
3.2.5

bundler -v
Bundler version 2.4.12
bundle exec rake install 
Could not find rake-13.0.1, pcaprub-0.13.1, packetfu-1.1.13 in locally installed gems
Run `bundle install` to install missing gems.
bundle install
Fetching gem metadata from https://rubygems.org/..
Fetching rake 13.0.1

Retrying download gem from https://rubygems.org/ due to error (2/4): Bundler::PermissionError There was an error while trying to write to `/var/lib/gems/2.7.0/cache/rake-13.0.1.gem`. It is likely that you need to grant write permissions for that path.

Retrying download gem from https://rubygems.org/ due to error (3/4): Bundler::PermissionError There was an error while trying to write to `/var/lib/gems/2.7.0/cache/rake-13.0.1.gem`. It is likely that you need to grant write permissions for that path.

Retrying download gem from https://rubygems.org/ due to error (4/4): Bundler::PermissionError There was an error while trying to write to `/var/lib/gems/2.7.0/cache/rake-13.0.1.gem`. It is likely that you need to grant write permissions for that path.

Using bundler 2.4.12
Fetching pcaprub 0.13.1

Retrying download gem from https://rubygems.org/ due to error (2/4): Bundler::PermissionError There was an error while trying to write to `/var/lib/gems/2.7.0/cache/pcaprub-0.13.1.gem`. It is likely that you need to grant write permissions for that path.

Retrying download gem from https://rubygems.org/ due to error (3/4): Bundler::PermissionError There was an error while trying to write to `/var/lib/gems/2.7.0/cache/pcaprub-0.13.1.gem`. It is likely that you need to grant write permissions for that path.

Retrying download gem from https://rubygems.org/ due to error (4/4): Bundler::PermissionError There was an error while trying to write to `/var/lib/gems/2.7.0/cache/pcaprub-0.13.1.gem`. It is likely that you need to grant write permissions for that path.

Bundler::PermissionError: There was an error while trying to write to
`/var/lib/gems/2.7.0/cache/rake-13.0.1.gem`. It is likely that you need to grant write permissions
for that path.
  /var/lib/gems/2.7.0/gems/bundler-2.4.12/lib/bundler/shared_helpers.rb:105:in `rescue in
filesystem_access'
  /var/lib/gems/2.7.0/gems/bundler-2.4.12/lib/bundler/shared_helpers.rb:102:in `filesystem_access'
/var/lib/gems/2.7.0/gems/bundler-2.4.12/lib/bundler/rubygems_integration.rb:483:in `block in
download_gem'
  /var/lib/gems/2.7.0/gems/bundler-2.4.12/lib/bundler/retry.rb:40:in `run'
  /var/lib/gems/2.7.0/gems/bundler-2.4.12/lib/bundler/retry.rb:30:in `attempt'
/var/lib/gems/2.7.0/gems/bundler-2.4.12/lib/bundler/rubygems_integration.rb:474:in
`download_gem'
  /var/lib/gems/2.7.0/gems/bundler-2.4.12/lib/bundler/source/rubygems.rb:481:in `download_gem'
  /var/lib/gems/2.7.0/gems/bundler-2.4.12/lib/bundler/source/rubygems.rb:443:in `fetch_gem'
/var/lib/gems/2.7.0/gems/bundler-2.4.12/lib/bundler/source/rubygems.rb:427:in
`fetch_gem_if_possible'
  /var/lib/gems/2.7.0/gems/bundler-2.4.12/lib/bundler/source/rubygems.rb:156:in `install'
  /var/lib/gems/2.7.0/gems/bundler-2.4.12/lib/bundler/installer/gem_installer.rb:54:in `install'
/var/lib/gems/2.7.0/gems/bundler-2.4.12/lib/bundler/installer/gem_installer.rb:16:in
`install_from_spec'
/var/lib/gems/2.7.0/gems/bundler-2.4.12/lib/bundler/installer/parallel_installer.rb:156:in
`do_install'
  /var/lib/gems/2.7.0/gems/bundler-2.4.12/lib/bundler/installer/parallel_installer.rb:84:in `call'
  /var/lib/gems/2.7.0/gems/bundler-2.4.12/lib/bundler/installer/parallel_installer.rb:67:in `call'
  /var/lib/gems/2.7.0/gems/bundler-2.4.12/lib/bundler/installer.rb:244:in `install_in_parallel'
  /var/lib/gems/2.7.0/gems/bundler-2.4.12/lib/bundler/installer.rb:201:in `install'
  /var/lib/gems/2.7.0/gems/bundler-2.4.12/lib/bundler/installer.rb:89:in `block in run'
  /var/lib/gems/2.7.0/gems/bundler-2.4.12/lib/bundler/process_lock.rb:19:in `rescue in lock'
  /var/lib/gems/2.7.0/gems/bundler-2.4.12/lib/bundler/process_lock.rb:15:in `lock'
  /var/lib/gems/2.7.0/gems/bundler-2.4.12/lib/bundler/installer.rb:71:in `run'
  /var/lib/gems/2.7.0/gems/bundler-2.4.12/lib/bundler/installer.rb:23:in `install'
  /var/lib/gems/2.7.0/gems/bundler-2.4.12/lib/bundler/cli/install.rb:62:in `run'
  /var/lib/gems/2.7.0/gems/bundler-2.4.12/lib/bundler/cli.rb:261:in `block in install'
  /var/lib/gems/2.7.0/gems/bundler-2.4.12/lib/bundler/settings.rb:131:in `temporary'
  /var/lib/gems/2.7.0/gems/bundler-2.4.12/lib/bundler/cli.rb:260:in `install'
  /var/lib/gems/2.7.0/gems/bundler-2.4.12/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/var/lib/gems/2.7.0/gems/bundler-2.4.12/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in
`invoke_command'
  /var/lib/gems/2.7.0/gems/bundler-2.4.12/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
  /var/lib/gems/2.7.0/gems/bundler-2.4.12/lib/bundler/cli.rb:34:in `dispatch'
  /var/lib/gems/2.7.0/gems/bundler-2.4.12/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
  /var/lib/gems/2.7.0/gems/bundler-2.4.12/lib/bundler/cli.rb:28:in `start'
  /var/lib/gems/2.7.0/gems/bundler-2.4.12/exe/bundle:45:in `block in <top (required)>'
/var/lib/gems/2.7.0/gems/bundler-2.4.12/lib/bundler/friendly_errors.rb:117:in
`with_friendly_errors'
  /var/lib/gems/2.7.0/gems/bundler-2.4.12/exe/bundle:33:in `<top (required)>'
  /usr/local/bin/bundle:23:in `load'
  /usr/local/bin/bundle:23:in `<main>'

An error occurred while installing rake (13.0.1), and Bundler cannot continue.

In Gemfile:
  rake

Issue "building" to use arp_standin

I'm attempting to follow the steps on a raspberry pi. I'm very unfamiliar with ruby on rails, so I'm not sure what the issue is.

ยฑ bin/setup



bundle install

+ bundle install

Fetching gem metadata from https://rubygems.org/..

Using rake 13.0.1

Using bundler 2.4.8

Installing pcaprub 0.13.1 with native extensions

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.



    current directory: /home/isaac/src/arp_standin/vendor/bundle/ruby/3.1.0/gems/pcaprub-0.13.1/ext/pcaprub_c

/usr/bin/ruby3.1 -I /usr/lib/ruby/vendor_ruby -r ./siteconf20240121-5976-6a8tsk.rb extconf.rb

mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h



You might have to install separate package for the ruby development

environment, ruby-dev or ruby-devel for example.



extconf failed, exit code 1



Gem files will remain installed in /home/isaac/src/arp_standin/vendor/bundle/ruby/3.1.0/gems/pcaprub-0.13.1 for inspection.

Results logged to /home/isaac/src/arp_standin/vendor/bundle/ruby/3.1.0/extensions/arm-linux/3.1.0/pcaprub-0.13.1/gem_make.out



  /usr/lib/ruby/vendor_ruby/rubygems/ext/builder.rb:95:in `run'

  /usr/lib/ruby/vendor_ruby/rubygems/ext/ext_conf_builder.rb:47:in `block in build'

  /usr/lib/ruby/3.1.0/tempfile.rb:317:in `open'

  /usr/lib/ruby/vendor_ruby/rubygems/ext/ext_conf_builder.rb:26:in `build'

  /usr/lib/ruby/vendor_ruby/rubygems/ext/builder.rb:164:in `build_extension'

  /usr/lib/ruby/vendor_ruby/rubygems/ext/builder.rb:198:in `block in build_extensions'

  /usr/lib/ruby/vendor_ruby/rubygems/ext/builder.rb:195:in `each'

  /usr/lib/ruby/vendor_ruby/rubygems/ext/builder.rb:195:in `build_extensions'

  /usr/lib/ruby/vendor_ruby/rubygems/installer.rb:851:in `build_extensions'

  /home/isaac/src/arp_standin/vendor/bundle/ruby/3.1.0/gems/bundler-2.4.8/lib/bundler/rubygems_gem_installer.rb:72:in `build_extensions'

  /home/isaac/src/arp_standin/vendor/bundle/ruby/3.1.0/gems/bundler-2.4.8/lib/bundler/rubygems_gem_installer.rb:28:in `install'

  /home/isaac/src/arp_standin/vendor/bundle/ruby/3.1.0/gems/bundler-2.4.8/lib/bundler/source/rubygems.rb:200:in `install'

  /home/isaac/src/arp_standin/vendor/bundle/ruby/3.1.0/gems/bundler-2.4.8/lib/bundler/installer/gem_installer.rb:54:in `install'

  /home/isaac/src/arp_standin/vendor/bundle/ruby/3.1.0/gems/bundler-2.4.8/lib/bundler/installer/gem_installer.rb:16:in `install_from_spec'

  /home/isaac/src/arp_standin/vendor/bundle/ruby/3.1.0/gems/bundler-2.4.8/lib/bundler/installer/parallel_installer.rb:156:in `do_install'

  /home/isaac/src/arp_standin/vendor/bundle/ruby/3.1.0/gems/bundler-2.4.8/lib/bundler/installer/parallel_installer.rb:147:in `block in worker_pool'

  /home/isaac/src/arp_standin/vendor/bundle/ruby/3.1.0/gems/bundler-2.4.8/lib/bundler/worker.rb:62:in `apply_func'

  /home/isaac/src/arp_standin/vendor/bundle/ruby/3.1.0/gems/bundler-2.4.8/lib/bundler/worker.rb:57:in `block in process_queue'

  /home/isaac/src/arp_standin/vendor/bundle/ruby/3.1.0/gems/bundler-2.4.8/lib/bundler/worker.rb:54:in `loop'

  /home/isaac/src/arp_standin/vendor/bundle/ruby/3.1.0/gems/bundler-2.4.8/lib/bundler/worker.rb:54:in `process_queue'

  /home/isaac/src/arp_standin/vendor/bundle/ruby/3.1.0/gems/bundler-2.4.8/lib/bundler/worker.rb:90:in `block (2 levels) in create_threads'



An error occurred while installing pcaprub (0.13.1), and Bundler cannot continue.



In Gemfile:

  arp_standin was resolved to 0.1.0, which depends on

    packetfu was resolved to 1.1.13, which depends on

      pcaprub


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.