GithubHelp home page GithubHelp logo

Comments (3)

pauljherring avatar pauljherring commented on August 27, 2024

Had to revert my changes (because, reasons,) but still needed apply the use of eth_hw_addr_set - the diff as a result:

diff --git a/snull/snull.c b/snull/snull.c
index 2efc2b5..adc5899 100644
--- a/snull/snull.c
+++ b/snull/snull.c
@@ -213,9 +213,10 @@ int snull_open(struct net_device *dev)
         * x is 0 or 1. The first byte is '\0' to avoid being a multicast
         * address (the first byte of multicast addrs is odd).
         */
-       memcpy(dev->dev_addr, "\0SNUL0", ETH_ALEN);
-       if (dev == snull_devs[1])
-               dev->dev_addr[ETH_ALEN-1]++; /* \0SNUL1 */
+       if (dev == snull_devs[0])
+               eth_hw_addr_set(dev, "\0SNUL0");
+       else
+               eth_hw_addr_set(dev, "\0SNUL1");
        if (use_napi) {
                struct snull_priv *priv = netdev_priv(dev);
                napi_enable(&priv->napi);

from ldd3.

dwalkes avatar dwalkes commented on August 27, 2024

Thanks @pauljherring do you want to create a pull request for this?
Should probably check for kernel 5.15 and later based on torvalds/linux@48eab83

See

#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 9, 0))
for an example use of KERNEL_VERSION

from ldd3.

pauljherring avatar pauljherring commented on August 27, 2024

.. I'm not at all sure that I'm the right person to be doing a pull request on this project, or for this in particular:

  1. it's not clear it's sufficient - even after compiling, the driver doesn't "work" as expected for me (pings go to the first interface, but don't make it out the other end, for example); this merely "gets it to compile"
  2. whether anything else in the repo needs looking at; I'm only concentrating on the network driver because I need to deal with an in-house network driver and this is part of my self-education on such matters.

from ldd3.

Related Issues (20)

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.