Putting logistic and linear regression into the generalised linear model framework is the right way to think of it and compare them.
From this point of view linear regression would be using GLM with identity link function, logistic regression uses the logit function as the link function.
From this point of view linear regression would be using GLM with identity link function, logistic regression uses the logit function as the link function.